“Put a key logger in Kogan’s computer in Russia and you’ve got everything,” Mr. Wylie said. He added: “It would make it incredibly easy for them to get access to this data. For me, that’s concerning and I think it should be looked into.”

Mr. Wylie’s appearance has coincided with a surge of collective dismay over data-mining, and many found themselves riveted by his testimony on Tuesday. Georgia Rakusen, 33, a user researcher at a technology firm in London, urged her Twitter followers to tune into the hearing, which she called “absolutely gripping stuff.”

His testimony, she said, “was something that, as a lay person, you could watch and start to grasp the enormity of how your data is used.”

“I think maybe people are just beginning to open up, to realize that maybe it’s not just about ads, maybe it’s not just what bands I like,” she said. Ms. Rakusen, who described her own work as “a space where we are supposed to make people click more,” said she hoped that employees of large technology companies would come forward more, looking at whistle-blowers like Mr. Wylie and Edward J. Snowden.

“I didn’t watch the whole three and a half hours,” she said. “But I basically didn’t get any other work done during that time.”

Mr. Wylie, who has described himself a “gay Canadian vegan,” dropped out of high school but discovered a genius for coding and, still in his teens, began working for political campaigns. He came close to losing his composure at only one moment on Tuesday, when he was asked what prompted him to turn against the technology he had helped create. He said his views had changed when Mr. Trump was elected.

“It was no longer this niche, shady firm,” he said. “It was a firm that was making a massive impact on the world. It’s a process of coming to terms with what you have created, and the impact that has had.”