Skip to content

Commit f4cd268

Browse files
Updated V8 debugging documentation (GitHub Issue ClearFoundry#14).
1 parent 9a668f9 commit f4cd268

4 files changed

Lines changed: 113 additions & 28 deletions

File tree

ClearScript/doc/Build.docx

1.28 KB
Binary file not shown.

ClearScript/doc/FAQtorial.docx

369 Bytes
Binary file not shown.

docs/Details/Build.html

Lines changed: 109 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -424,33 +424,118 @@ <h1 style='margin-left:.5in;text-indent:-.5in'><span style='font:7.0pt "Times Ne
424424
<p class=MsoNormal style='margin-left:.25in'>V8 does not support standard
425425
Windows script debugging. Instead, it implements its own TCP/IP-based debugging
426426
protocol. A convenient way to debug JavaScript code running in V8 is to use the
427-
open-source Eclipse IDE:</p>
427+
Visual Studio Code IDE:</p>
428428

429429
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
430430
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Install
431-
<a href="https://java.com/en/download/">Java</a> and <a
432-
href="http://www.eclipse.org/downloads/">Eclipse</a>.</p>
431+
<a href="https://code.visualstudio.com/">Visual Studio Code</a>.</p>
433432

434433
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
435-
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Install
436-
Google Chrome Developer Tools for Java:</p>
434+
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Set
435+
up one or more ClearScript V8 debug configurations:</p>
437436

438437
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>a.<span
439438
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Launch
440-
Eclipse and click <b>Help</b> &#8594; <b>Install New Software</b>.</p>
439+
Visual Studio Code and click <b>File</b> &#8594; <b>Preferences </b>&#8594;<b> Settings
440+
</b>to open your User Settings file.</p>
441441

442442
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
443-
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Paste
444-
the following URL into the <b>Work with</b> field: <a
445-
href="http://chromedevtools.googlecode.com/svn/update/dev/">http://chromedevtools.googlecode.com/svn/update/dev/</a></p>
443+
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Add
444+
the following section to the file:</p>
445+
446+
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
447+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
448+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#9CDCFE'>&quot;launch&quot;</span></b><b><span
449+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>:
450+
{</span></b></p>
451+
452+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
453+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
454+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>   
455+
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
456+
color:#9CDCFE'>&quot;version&quot;</span></b><b><span style='font-size:10.0pt;
457+
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
458+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;0.2.0&quot;</span></b><b><span
459+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
460+
461+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
462+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
463+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>   
464+
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
465+
color:#9CDCFE'>&quot;configurations&quot;</span></b><b><span style='font-size:
466+
10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>: [</span></b></p>
467+
468+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
469+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
470+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>       
471+
{</span></b></p>
472+
473+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
474+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
475+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
476+
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
477+
color:#9CDCFE'>&quot;name&quot;</span></b><b><span style='font-size:10.0pt;
478+
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
479+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;Attach
480+
to ClearScript V8 on port 9222&quot;</span></b><b><span
481+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
482+
483+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
484+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
485+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
486+
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
487+
color:#9CDCFE'>&quot;type&quot;</span></b><b><span style='font-size:10.0pt;
488+
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
489+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;node&quot;</span></b><b><span
490+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
491+
492+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
493+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
494+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
495+
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
496+
color:#9CDCFE'>&quot;request&quot;</span></b><b><span style='font-size:10.0pt;
497+
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
498+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;attach&quot;</span></b><b><span
499+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
500+
501+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
502+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
503+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
504+
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
505+
color:#9CDCFE'>&quot;protocol&quot;</span></b><b><span style='font-size:10.0pt;
506+
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
507+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;legacy&quot;</span></b><b><span
508+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
509+
510+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
511+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
512+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
513+
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
514+
color:#9CDCFE'>&quot;port&quot;</span></b><b><span style='font-size:10.0pt;
515+
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
516+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#B5CEA8'>9222</span></b></p>
517+
518+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
519+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
520+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>       
521+
}</span></b></p>
522+
523+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
524+
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
525+
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>   
526+
]</span></b></p>
527+
528+
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
529+
14.0pt;margin-left:1.5in;background:#1E1E1E'><b><span style='font-size:10.0pt;
530+
line-height:115%;font-family:Consolas;color:#D4D4D4'>}</span></b></p>
446531

447532
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>c.<span
448-
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Select
449-
<b>Google Chrome Developer Tools</b> and complete the dialog.</p>
533+
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>You
534+
can specify additional configurations for different TCP/IP port numbers.</p>
450535

451536
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>d.<span
452-
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Restart
453-
Eclipse.</p>
537+
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Click
538+
<b>File</b> &#8594; <b>Save</b>.</p>
454539

455540
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
456541
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Enable
@@ -460,27 +545,28 @@ <h1 style='margin-left:.5in;text-indent:-.5in'><span style='font:7.0pt "Times Ne
460545
constructor with <a
461546
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngineFlags.htm"><b><span
462547
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngineFlags.EnableDebugging</span></b></a>
463-
and an available TCP/IP port number. The default port number is 9222.</p>
548+
and a TCP/IP port number that matches one of your debug configurations. The
549+
default port number is 9222.</p>
464550

465551
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
466552
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Attach
467-
the Eclipse debugger to your application:</p>
553+
the Visual Studio Code debugger to your application:</p>
468554

469555
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>a.<span
470-
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>In
471-
Eclipse, select <b>Run</b> &#8594; <b>Debug Configurations</b>.</p>
556+
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Click
557+
<b>View</b> &#8594; <b>Debug</b> to bring up the Debug view.</p>
472558

473559
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
474-
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Right-click
475-
on <b>Standalone V8 VM</b> and select <b>New</b>.</p>
560+
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Select
561+
the appropriate debug configuration at the top of the Debug Side Bar.</p>
476562

477563
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>c.<span
478-
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Fill
479-
in the correct port number and click <b>Debug</b>.</p>
564+
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Click
565+
<b>Debug</b> &#8594; <b>Start Debugging</b>.</p>
480566

481567
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:#00B050'>Note:</span></b>
482-
You can also attach Visual Studio to your application for simultaneous
483-
debugging of script, managed, and native code.</p>
568+
You can also attach Visual Studio to your application for simultaneous debugging
569+
of script, managed, and native code.</p>
484570

485571
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
486572
.5in;margin-bottom:.0001pt;text-indent:-.5in'>VI. Acknowledgments</h1>

docs/Tutorial/FAQtorial.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,11 +1239,10 @@ <h1 style='margin-left:.25in;text-indent:-.25in'>21. Can I route a callback to a
12391239
<p class=MsoNormal style='margin-left:.25in'>If you’re using ClearScript with JScript,
12401240
VBScript, or another Windows Script engine, you can use Visual Studio to debug
12411241
your application in script mode. If you’re using ClearScript’s new V8-based JavaScript
1242-
engine, your best option is <a href="http://www.eclipse.org/">Eclipse</a> combined
1243-
with <a href="http://code.google.com/p/chromedevtools/">Google Chrome Developer
1244-
Tools for Java</a>. Best of all is that you can attach both Visual Studio and
1245-
Eclipse to the same process for simultaneous debugging of script, managed, and
1246-
native code. See <a
1242+
engine, your best option is <a href="https://code.visualstudio.com/">Visual
1243+
Studio Code</a>. Best of all is that you can attach both Visual Studio and Visual
1244+
Studio Code to the same process for simultaneous debugging of script, managed,
1245+
and native code. See <a
12471246
href="https://microsoft.github.io/ClearScript/Details/Build.html">here</a> for
12481247
the latest information about using ClearScript with V8.</p>
12491248

0 commit comments

Comments
 (0)