Roku Inc. shares surged in their trading debut, a welcome sign for the stalled technology IPO market.

Shares of the company, which makes streaming-media devices and software, rose $9.50, or 68%, to $23.50, closing at their session high and bringing Roku’s valuation to $2.2 billion. The stock opened at $15.78 and traded only as low as $15.75.

Roku’s...