Is it possible to test Discourse Embed comment on localhost?

Clarification: It does work on localhost if you use bare metal, as I’ve done this many times. The issue here is finding a sutiable vagrant configuration to test/develop it.

As for your error, you’ve forced hostname to localhost:3000 and are visiting it on http://cpp.dev:3001 – those need to match so I’d force the hostname to be whatever you are access it via your web browser.