See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

How to make Chrome Dev Tools show the JavaScript source

General Tech Bugs & Fixes
Max. 2000 characters

Dilpreet Kaur


( 7 months ago )


I slightly modified the sample, importing some code from d8. Then, using websocketpp and asio, I added a WebSocket Server to the program. Also, I used V8 inspector from an embedder standpoint to add a simple implementation for the inspector protocol back-end.

Now, when I start my program and then use Chrome to navigate to chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=, I receive the following messages from the CDT:


for witch the response is:




for this one a notification and a response are sent:





again, a notification and a response sent back to the front-end:



For the moment, I will not add to the question the other messages received from the front-end, and the responses sent. The last exchange is:


My problem: in CDT, the Sources tab is empty (and therefore, I can't try to put a breakpoint).

My code to inject JS in V8:

const char * pszScript = "function add( a, b) { return a+b; }";
v8::Local<v8::String> source =
  v8::String::NewFromUtf8(isolate, pszScript, v8::NewStringType::kNormal).ToLocalChecked

what's your interest