forked from ClearFoundry/ClearScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild.html
More file actions
971 lines (816 loc) · 51.9 KB
/
Copy pathBuild.html
File metadata and controls
971 lines (816 loc) · 51.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
<html>
<head>
<link rel="shortcut icon" type="image/png" href="../favicon.png">
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<title>Building, Integrating, and Deploying ClearScript</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Cambria;
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:6.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
h1
{mso-style-link:"Heading 1 Char";
margin-top:10.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:115%;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Cambria",serif;
color:#365F91;}
h2
{mso-style-link:"Heading 2 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:115%;
page-break-after:avoid;
font-size:13.0pt;
font-family:"Cambria",serif;
color:#365F91;
font-weight:normal;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
{mso-style-link:"Title Char";
margin-top:6.0pt;
margin-right:0in;
margin-bottom:15.0pt;
margin-left:0in;
border:none;
padding:0in;
font-size:26.0pt;
font-family:"Cambria",serif;
color:#17365D;
letter-spacing:.25pt;}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
{mso-style-link:"Title Char";
margin-top:6.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
border:none;
padding:0in;
font-size:26.0pt;
font-family:"Cambria",serif;
color:#17365D;
letter-spacing:.25pt;}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
{mso-style-link:"Title Char";
margin:0in;
border:none;
padding:0in;
font-size:26.0pt;
font-family:"Cambria",serif;
color:#17365D;
letter-spacing:.25pt;}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
{mso-style-link:"Title Char";
margin-top:0in;
margin-right:0in;
margin-bottom:15.0pt;
margin-left:0in;
border:none;
padding:0in;
font-size:26.0pt;
font-family:"Cambria",serif;
color:#17365D;
letter-spacing:.25pt;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin-top:6.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{margin-top:6.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.TitleChar
{mso-style-name:"Title Char";
mso-style-link:Title;
font-family:"Cambria",serif;
color:#17365D;
letter-spacing:.25pt;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-link:"Heading 1";
font-family:"Cambria",serif;
color:#365F91;
font-weight:bold;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-link:"Heading 2";
font-family:"Cambria",serif;
color:#365F91;}
.MsoChpDefault
{font-family:"Calibri",sans-serif;}
.MsoPapDefault
{margin-bottom:10.0pt;
line-height:115%;}
/* Page Definitions */
@page WordSection1
{size:8.5in 11.0in;
margin:.5in .5in .5in .5in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple style="background-color: gray">
<div class=WordSection1 style="width: 9in; margin: auto; zoom: 1.2; background-color: white; padding: .25in">
<div style='border:none;border-bottom:solid #4F81BD 1.0pt;padding:0in 0in 4.0pt 0in'>
<p class=MsoTitle style='margin-top:0in'><a name="OLE_LINK9">Building,
Integrating, and Deploying ClearScript</a></p>
</div>
<h1 style='margin-left:.5in;text-indent:-.5in'><span style='font:7.0pt "Times New Roman"'>
</span>I. Welcome to ClearScript!</h1>
<p class=MsoNormal style='margin-left:.25in'>ClearScript is a library that
allows you to add scripting to your .NET applications. It supports <a
href="https://v8.dev/">V8</a> (Windows, Linux, macOS) and <a
href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/hbxc2t98(v=vs.84)">JScript</a>/<a
href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/t0aew7h6(v=vs.84)">VBScript</a>
(Windows only).</p>
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'><span style='font:7.0pt "Times New Roman"'> </span>II.
ClearScript NuGet packages</h1>
<p class=MsoNormal style='margin-left:.25in'>Now that official ClearScript
NuGet packages are available, you can simply add one to your project and skip
to <a href="#_Debugging_with_ClearScript_2">Section VII</a> below.</p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.35pt;margin-bottom:.0001pt'>Windows</h2>
<p class=MsoNormal style='margin-left:.25in'>Use Visual Studio’s <a
href="https://docs.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio">NuGet
Package Manager</a> or <a
href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-add-package"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>dotnet add
package</span></b></a> to add the <a
href="https://www.nuget.org/packages/Microsoft.ClearScript">Microsoft.ClearScript</a>
(x86/x64) or <a
href="https://www.nuget.org/packages/Microsoft.ClearScript.win-arm64">Microsoft.ClearScript.win-arm64</a>
package to your project. Remember to use the <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>-v</span></b> option on the <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>dotnet</span></b>
command line to add pre-release packages.</p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.35pt;margin-bottom:.0001pt'>Linux</h2>
<p class=MsoNormal style='margin-left:.25in'>Use <a
href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-add-package"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>dotnet add
package</span></b></a> to add the <a
href="https://www.nuget.org/packages/Microsoft.ClearScript.linux-x64">Microsoft.ClearScript.linux-x64</a>,
<a href="https://www.nuget.org/packages/Microsoft.ClearScript.linux-arm">Microsoft.ClearScript.linux-arm</a>,
or <a href="https://www.nuget.org/packages/Microsoft.ClearScript.linux-arm64">Microsoft.ClearScript.linux-arm64</a>
package to your project. Remember to use the <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>-v</span></b> option on the <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>dotnet</span></b>
command line to add pre-release packages.</p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.35pt;margin-bottom:.0001pt'>macOS</h2>
<p class=MsoNormal style='margin-left:.25in'>Use <a
href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-add-package"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>dotnet add
package</span></b></a> to add the <a
href="https://www.nuget.org/packages/Microsoft.ClearScript.osx-x64">Microsoft.ClearScript.osx-x64</a>
or <a href="https://www.nuget.org/packages/Microsoft.ClearScript.osx-arm64">Microsoft.ClearScript.osx-arm64</a>
package to your project. Remember to use the <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>-v</span></b> option on the <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>dotnet</span></b>
command line to add pre-release packages.</p>
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'>III. Building ClearScript</h1>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.0pt;margin-bottom:.0001pt'><a name="OLE_LINK13"></a><a name="OLE_LINK19"></a><a
name="OLE_LINK15"></a><a name="OLE_LINK20">Windows</a></h2>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:red'>Important:
</span></b>This procedure requires a 64-bit Windows operating system running on
x64 hardware.</p>
<p class=MsoNormal style='margin-left:.25in'>The ClearScript source code <a
name="OLE_LINK25">is hosted </a>in a <a
href="http://www.git-scm.com/download/win">Git</a> repository. If you’re installing
Git for the first time, select the options <b>Use Git from the Windows Command
Prompt</b> and <b>Checkout Windows-style, commit Unix-style line endings</b>.
If you already have Git installed, use <a
href="https://git-scm.com/docs/git-config"><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>git-config</span></b></a> to ensure that
the <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>core.autocrlf</span>
</b>variable is set to <b><span style='font-size:10.0pt;line-height:115%;
font-family:Consolas'>true</span></b>.</p>
<p class=MsoNormal style='margin-left:.25in'>Use <a
href="https://git-scm.com/docs/git-clone"><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>git-clone</span></b></a> to download the
<a href="https://github.com/Microsoft/ClearScript">ClearScript source code</a>
into a convenient directory. Use a directory at or near the root of a drive to
avoid path length issues.</p>
<p class=MsoNormal style='margin-left:.25in'>The provided project and solution
files support <a href="https://visualstudio.microsoft.com/downloads/">Visual
Studio 2022</a>. They produce architecture-neutral managed libraries that
target .NET 5.0+, .NET Framework 4.5+, .NET Core 3.1, and .NET Standard 2.1.
ClearScript does not support older environments. The output directory is <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>bin\[Debug|Release]</span></b>.</p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:red'>Important:
</span></b>Ensure that <a
href="https://dotnet.microsoft.com/en-us/download/dotnet/8.0">.NET 8.0 SDK</a>
is installed before building ClearScript.</p>
<p class=MsoNormal style='margin-left:.25in'>There are two ways to build
ClearScript – with and without V8 support. If you don't need V8 support, simply
build the <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScript.NoV8</span></b>
solution using Visual Studio. Note that this solution does not include test
projects.</p>
<p class=MsoNormal style='margin-left:.25in'>To build full ClearScript with V8
support, you must first acquire and build V8:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> This procedure currently requires <a
href="https://visualstudio.microsoft.com/downloads/">Visual Studio 2022</a>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> Ensure that the path to your
ClearScript root directory does not contain spaces or non-ASCII characters.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> Your Visual Studio installation must
include the <b>.NET desktop development</b>, <b>Desktop development with C++</b>,
and <b>Universal Windows Platform Development</b> workloads, as well as the <b>C++
ARM build tools</b>, <b>C++ ARM64</b> <b>build tools</b>, and <b>C++ Clang
Compiler for Windows</b> components.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> The V8 build also requires <a
href="https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/"><span
style='font-size:10.5pt;line-height:115%;font-family:"Segoe UI",sans-serif;
background:white'>Windows SDK</span></a><span style='font-size:10.5pt;
line-height:115%;font-family:"Segoe UI",sans-serif;color:#171717;background:
white'> version </span><a href="https://go.microsoft.com/fwlink/?linkid=2261842"><span
style='font-size:10.5pt;line-height:115%;font-family:"Segoe UI",sans-serif;
background:white'>10.0.22621</span></a>. Your Windows SDK installation must
include the <b>Debugging Tools for Windows</b> feature.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'> </span>Open
a Visual Studio 2022 developer command prompt and run the <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8Update</span></b>
script from your ClearScript root directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\ClearScript></span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>V8Update
[/N] [Debug|<a name="OLE_LINK16">Release</a>] [Latest|Tested|<Revision>]</span></b></p>
<p class=MsoNormal style='margin-left:.75in'>This script downloads the V8
source code and its dependencies and builds x86, x64, and arm64 V8 libraries in
the specified configuration. It requires approximately 12GB of additional disk
space and does not perform any permanent software installation on your machine.</p>
<p class=MsoNormal style='margin-left:.75in'>The optional <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>/N</span></b>
flag causes V8Update to reuse previously downloaded files if possible. It's
useful for testing local V8 modifications.</p>
<p class=MsoNormal style='margin-left:.75in'>Specifying <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>Debug</span></b>
or <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>Release</span></b>
is optional; the default is <b><span style='font-size:10.0pt;line-height:115%;
font-family:Consolas'>Release</span></b>. If you need both variants, run the
script twice as follows:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\ClearScript></span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>V8Update
&& V8Update /N Debug</span></b></p>
<p class=MsoNormal style='margin-left:.75in'><b><span style='color:#00B050'>Note:</span></b>
Depending on your PC hardware and internet connection, this step could take up
to a half-hour or longer.</p>
<p class=MsoNormal style='margin-left:.75in'>By default, <a name="_Hlk482371988"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8Update</span></b></a>
builds a V8 revision that has been tested with the current version of
ClearScript. If you'd like to use a specific revision instead, place the
desired branch name, commit ID, or tag on the <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>V8Update</span></b> command line. Browse
<a href="https://chromium.googlesource.com/v8/v8.git">here</a> to view V8's
revision history.</p>
<p class=MsoNormal style='margin-left:.25in'>You are now ready to build the full
<b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScript</span></b>
solution using Visual Studio 2022.</p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:#00B050'>Note:</span></b>
The first time you open the solution, Visual Studio may prompt you to upgrade
one or more projects to the latest platform toolset or .NET Framework. We
recommend that you select <b>Cancel</b> or <b>Don't Upgrade</b>. If you
encounter issues building ClearScript’s unmanaged projects (<b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScriptV8.win-x86</span></b>,
<b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScriptV8.win-x64</span></b>,
and <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScriptV8.win-arm64</span></b>),
ensure that their <b>Windows SDK Version</b> properties are set to an installed
version of the Windows SDK.</p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:#00B050'>Optional:</span></b>
The ClearScript repository includes the <a
href="https://microsoft.github.io/ClearScript/Reference/html/R_Project_Reference.htm">ClearScript
Library Reference</a> in HTML and Compiled HTML (.CHM) formats. If you'd like
to rebuild these files, use <a href="https://github.com/EWSoftware/SHFB">Sandcastle
Help File Builder</a> with the provided project files (<b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScript\doc\[Web]Reference.shfbproj</span></b>).</p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.35pt;margin-bottom:.0001pt'>Linux</h2>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:red'>Important:
</span></b>This procedure requires a 64-bit Linux operating system running on
x64 hardware.</p>
<p class=MsoNormal style='margin-left:.25in'>Here’s how to acquire and build V8
and ClearScript on Linux:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'> </span>Install
the following packages: <a href="https://www.git-scm.com/download/linux">Git</a>,
<a href="https://dotnet.microsoft.com/en-us/download/dotnet/8.0">.NET 8.0 SDK</a>,
<a href="https://clang.llvm.org/">Clang</a>, <a
href="https://www.gnu.org/software/make/">GNU Make</a>, and <a
href="http://pkgconf.org/">pkgconf</a>. For each of these, check your package
manager first, and then the official website.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'> </span>Use
<a href="https://git-scm.com/docs/git-clone"><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>git-clone</span></b></a> to download the
<a href="https://github.com/Microsoft/ClearScript">ClearScript source code</a>
into a convenient directory. Avoid very long directory paths.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> Ensure that the path to your
ClearScript root directory does not contain spaces or non-ASCII characters.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'> </span>Run
the following command from your ClearScript root directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>user@host:/path/to/ClearScript$</span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>make
-f Unix/Makefile [DEBUG=1] [CPU=[arm|arm64]]</span></b></p>
<p class=MsoNormal style='margin-left:.75in'>Specifying <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>DEBUG=1</span></b>
is optional; the default configuration is <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>Release</span></b>. The output directory
is <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>bin/[Debug|Release]</span></b>.</p>
<p class=MsoNormal style='margin-left:.75in'>Specify <b><span style='font-size:
10.0pt;line-height:115%;font-family:Consolas'>CPU=arm</span></b> to cross-build
for the arm architecture. This requires arm C++ cross-build tools, such as <a
href="https://packages.ubuntu.com/focal/g++-10-arm-linux-gnueabihf">g++-10-arm-linux-gnueabihf</a>
on Ubuntu.</p>
<p class=MsoNormal style='margin-left:.75in'>Specify <b><span style='font-size:
10.0pt;line-height:115%;font-family:Consolas'>CPU=arm64</span></b> to
cross-build for the arm64 architecture. This requires arm64 C++ cross-build tools,
such as <a href="https://packages.ubuntu.com/focal/g++-10-aarch64-linux-gnu">g++-10-aarch64-linux-gnu</a>
on Ubuntu.</p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.35pt;margin-bottom:.0001pt'>macOS</h2>
<p class=MsoNormal style='margin-left:.25in'>Here’s how to acquire and build V8
and ClearScript on macOS:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'> </span>Install
<a href="https://developer.apple.com/xcode/">Xcode</a> and <a
href="https://dotnet.microsoft.com/en-us/download/dotnet/8.0">.NET 8.0 SDK</a>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'> </span>Use
<a href="https://git-scm.com/docs/git-clone"><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>git-clone</span></b></a> to download the
<a href="https://github.com/Microsoft/ClearScript">ClearScript source code</a>
into a convenient directory. Avoid very long directory paths.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> Ensure that the path to your
ClearScript root directory does not contain spaces or non-ASCII characters.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'> </span>Launch
the <a href="https://en.wikipedia.org/wiki/Terminal_(macOS)">Terminal</a> app
and run the following command from your ClearScript root directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>user@host:/path/to/ClearScript$</span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>make
-f Unix/Makefile [DEBUG=1] [CPU=[x64|arm64]]</span></b></p>
<p class=MsoNormal style='margin-left:.75in'>Specifying <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>DEBUG=1</span></b>
is optional; the default configuration is <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>Release</span></b>. The output directory
is <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>bin/[Debug|Release]</span></b>.</p>
<p class=MsoNormal style='margin-left:.75in'>Specify <b><span style='font-size:
10.0pt;line-height:115%;font-family:Consolas'>CPU=x64</span></b> or <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>CPU=arm64</span></b>
to build for the corresponding architecture; the default is the current
architecture.</p>
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'>IV. Building strong-named
ClearScript assemblies (optional, Windows only)</h1>
<p class=MsoNormal style='margin-left:.25in'>ClearScript includes optional
support for building strong-named assemblies. Use the following one-time
procedure to enable this feature:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'> </span>If
the ClearScript solution is open in Visual Studio, close it.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'> </span>Generate
a cryptographic key pair in your ClearScript root directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><a name="OLE_LINK5"><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\ClearScript></span></a><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>sn
-k ClearScript.snk</span></b></p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'> </span>Open
the ClearScript solution in Visual Studio.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'> </span>Click
<a name="OLE_LINK12"><b>Build</b> </a>→ <b>Transform All T4 Templates</b>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'> </span>Rebuild
the solution.</p>
<p class=MsoNormal style='margin-left:.25in'>Once you've performed these steps,
the ClearScript assemblies you build will have strong names.</p>
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'><span style='font:7.0pt "Times New Roman"'>
</span>V. Integrating and deploying ClearScript with your application</h1>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.0pt;margin-bottom:.0001pt'>Windows (x86/x64)</h2>
<p class=MsoNormal style='margin-left:.25in'>Once you've built ClearScript,
here's how to add it to your application:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'> </span>Right-click
your project in Visual Studio and select <b>Add Reference</b>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'> </span>In
the Reference Manager window, click <b>Browse</b> and locate your ClearScript
output directory (see above). Select <b>ClearScript.Core.dll</b>, <b>ClearScript.Windows.dll</b>,
<b>ClearScript.Windows.Core.dll</b>, and <b>ClearScript.V8.dll</b>, click <b>Add</b>,
and then click <b>OK</b> to exit Reference Manager.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> If you're using V8, you must also copy
the following files from your ClearScript output directory to your
application's directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.0in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScriptV8.win-x86.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:black'>ClearScriptV8.win-x64.dll</span></b></p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.0pt;margin-bottom:.0001pt'>Windows (arm64)</h2>
<p class=MsoNormal style='margin-left:.25in'>Once you've built ClearScript,
here's how to reference it in your application:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:.5in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\MyApp></span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>dotnet
add reference D:\Path\To\ClearScript\NetCore\ClearScript.V8</span></b></p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:red'>Important:</span></b>
If your application fails to load ClearScript, ensure that the following
ClearScript output files are present in your application’s output directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.Core.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.V8.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.V8.ICUData.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:.5in;background:#F2F2F2'><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:black'>ClearScriptV8.win-arm64.dll</span></b></p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.0pt;margin-bottom:.0001pt'>Linux</h2>
<p class=MsoNormal style='margin-left:.25in'>Once you've built ClearScript,
here's how to reference it in your application:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:.5in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>user@host:/path/to/MyApp$</span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>dotnet
add reference /path/to/ClearScript/NetCore/ClearScript.V8</span></b></p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:red'>Important:</span></b>
If your application fails to load ClearScript, ensure that the following ClearScript
output files are present in your application’s output directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.Core.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.V8.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.V8.ICUData.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:.5in;background:#F2F2F2'><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:black'>ClearScriptV8.linux-[x64|arm64].so</span></b></p>
<h2 style='margin-top:6.0pt;margin-right:0in;margin-bottom:0in;margin-left:
9.0pt;margin-bottom:.0001pt'>macOS</h2>
<p class=MsoNormal style='margin-left:.25in'>Once you've built ClearScript,
here's how to reference it in your application:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:.5in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>user@host:/path/to/MyApp$</span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>dotnet
add reference /path/to/ClearScript/NetCore/ClearScript.V8</span></b></p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:red'>Important:</span></b>
If your application fails to load ClearScript, ensure that the following
ClearScript output files are present in your application’s output directory:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.Core.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.V8.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScript.V8.ICUData.dll</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:.5in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>ClearScriptV8.osx-[x64|arm64].dylib</span></b></p>
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'>VI. Machine-level (global) deployment
(.NET Framework only, x86/x64)</h1>
<p class=MsoNormal style='margin-left:.25in'><a
name="_Debugging_with_ClearScript_1"></a>You can deploy ClearScript at the
machine level, making it available to all locally installed applications. For
this to work, your ClearScript assemblies must have strong names. If you’re
building ClearScript yourself, see <a href="#_Building_strong-named_ClearScript">Section
IV</a> for more information. The <a
href="https://www.nuget.org/packages/Microsoft.ClearScript">official
ClearScript NuGet package</a> contains strong-named assemblies.</p>
<p class=MsoNormal style='margin-left:.25in'>To deploy ClearScript globally,
install its managed assembly in the <a
href="https://docs.microsoft.com/en-us/dotnet/framework/app-domains/gac">Global
Assembly Cache</a>:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:.5in;background:#F2F2F2'><a name="_Hlk14466261"><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\ClearScript\bin\Release></span></a><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>gacutil
/i ClearScript.dll</span></b></p>
<p class=MsoNormal style='margin-left:.25in'>Additionally, you must copy
ClearScript’s V8 assemblies to the system folder:</p>
<p class=MsoNormal style='margin-left:.5in'>On 32-bit Windows:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><a name="_Hlk14466280"><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\ClearScript\bin\Release></span></a><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><a
name="_Hlk14466717"><b><span style='font-size:10.0pt;line-height:115%;
font-family:Consolas;color:black'>copy ClearScriptV8.win-x86.dll %SystemRoot%\System32</span></b></a></p>
<p class=MsoNormal style='margin-left:.5in'>On 64-bit Windows:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.0in;margin-bottom:.0001pt;background:#F2F2F2'><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\ClearScript\bin\Release></span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>copy
ClearScriptV8.win-x64.dll %SystemRoot%\System32</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:gray'>C:\Path\To\ClearScript\bin\Release></span><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:gray'> </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:black'>copy
ClearScriptV8.win-x86.dll %SystemRoot%\SysWOW64</span></b></p>
<p class=MsoNormal style='margin-left:.25in'><a
name="_Debugging_with_ClearScript"></a><b><span style='color:red'>Important:</span></b>
The commands above require an elevated command prompt.</p>
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'><a
name="_Debugging_with_ClearScript_2"></a>VII. Debugging with ClearScript and V8</h1>
<p class=MsoNormal style='margin-left:.25in'>V8 does not support standard
Windows script debugging. Instead, it implements its own WebSocket-based
debugging protocol. A convenient way to debug JavaScript code running in V8 is
to use the Visual Studio Code IDE:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'> </span>Install
and launch <a href="https://code.visualstudio.com/">Visual Studio Code</a>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'> </span>Set
up one or more ClearScript V8 debug configurations:</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'><a
name="OLE_LINK18">a.<span style='font:7.0pt "Times New Roman"'>
</span>Click <b>File</b> </a>→ <b>Preferences </b>→<b> Settings </b>to open
your user settings.</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'> </span>Locate
or search for the <b>Launch</b> configuration and click <b>Edit in settings.json</b>.</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>c.<span
style='font:7.0pt "Times New Roman"'> </span>Add
the highlighted section to the file:</p>
<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#9CDCFE'>"launch"</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>:
{</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"version"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>"0.2.0"</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"configurations"</span></b><b><span style='font-size:
10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>: [</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
{</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"name"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>"Attach
to ClearScript V8 on port 9222"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"type"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>"node"</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"request"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>"attach"</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"protocol"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>"inspector"</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"address"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>"localhost"</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>"port"</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#B5CEA8'>9222</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1F497D'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
}</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>
]</span></b></p>
<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.5in;background:#1E1E1E'><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>}</span></b></p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>d.<span
style='font:7.0pt "Times New Roman"'> </span>You
can specify additional configurations for different hosts, port numbers, and
other options. See <a
href="https://code.visualstudio.com/docs/nodejs/nodejs-debugging">here</a> for
more information.</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>e.<span
style='font:7.0pt "Times New Roman"'> </span>Click
<b>File</b> → <b>Save</b>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'> </span>Enable
script debugging in your application by invoking the <a
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngine.htm"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngine</span></b></a>
constructor with <a name="OLE_LINK2"></a><a
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngineFlags.htm"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngineFlags.EnableDebugging</span></b></a>
and a TCP port number that matches one of your debug configurations. The
default port number is 9222.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'> </span>You
can add the flag <a
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngineFlags.htm"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngineFlags.AwaitDebuggerAndPauseOnStart</span></b></a>
to have the script engine stop and wait for a debugger connection before
executing script code. Once attached, the debugger will be in a breakpoint
state.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'> </span>If
you’d like to debug your application remotely, you must also do the following:</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>a.<span
style='font:7.0pt "Times New Roman"'> </span>Construct
your script engine with the additional flag <a
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngineFlags.htm"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngineFlags.EnableRemoteDebugging</span></b></a>.</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'> </span><b><span
style='color:red'>Important:</span></b> If necessary, configure your firewall
to allow incoming connections to your TCP port.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>6.<span
style='font:7.0pt "Times New Roman"'> </span>Attach
the Visual Studio Code debugger to your application:</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'><a
name="OLE_LINK1">a.<span style='font:7.0pt "Times New Roman"'>
</span>Click <b>View</b> </a>→ <b>Run</b> to bring up the Run Side Bar.</p>
<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'> </span>Click
<b>Run</b> → <b>Start Debugging</b> to attach the debugger to your application.</p>
<p class=MsoNormal style='margin-left:.5in'><b><span style='color:#00B050'>Note:</span></b>
If you’re having issues with remote debugging, try disabling the <b>debug.JavaScript.usePreview</b>
setting.</p>
<p class=MsoNormal style='margin-left:.5in'><b><span style='color:#00B050'>Note:</span></b>
You can also attach Visual Studio to your application for simultaneous
debugging of script, managed, and native code.</p>
<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'>VIII. Acknowledgments</h1>
<p class=MsoNormal style='margin-left:.25in'>We’d like to thank:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'><span
style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><a href="https://code.google.com/p/v8/people/list">The V8 team</a>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'><span
style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><a href="https://jekyllrb.com/team/">The Jekyll team</a>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'><span
style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><a href="http://kennethreitz.org">Kenneth Reitz</a> for
generously providing the <a href="http://httpbin.org"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>Httpbin</span></b></a>
service.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'><span
style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><a href="https://mademistakes.com/">Michael Rose</a> for
generously providing the <a href="https://mmistakes.github.io/so-simple-theme/">So
Simple</a> Jekyll theme.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'><span
style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><a href="https://www.toptal.com/">Toptal</a> for generously
providing the <a href="https://www.toptal.com/developers/javascript-minifier">Toptal
JavaScript Minifier</a>.</p>
</div>
</body>
</html>