You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SampleApps/WebView2APISample/documentation/Testing-Instructions.md
+41-53Lines changed: 41 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -673,59 +673,47 @@ Menu item `Script -> Host Objects` is demonstrated.
673
673
674
674
#### Script Debugging
675
675
676
-
##### [VSCode] Single WebView JavaScript Debugging (Old Tool: Debugger For Microsoft Edge)
677
-
678
-
Test Single WebView JavaScript Debugging with old debugging tool: [Debugger For Microsoft Edge](https://github.com/microsoft/vscode-edge-debug2) in VSCode
679
-
680
-
1. Open VSCode, go to extension and download the old Edge Script Debugging tool
2. Go to same folder where sample app `WebView2APISample.exe` lives and open file `ScenarioJavaScripDebugIndex.js` from the same folder. Set a breakpoint on `function OnAddClick()`
683
-
3. In VSCode, go to Debug tab. On the top drop down, select `Debugger For Microsoft Edge: Sample app (Script $(Configuration)|$(Platform))`. (eg. `Debugger For Microsoft Edge: Sample app (Script Debug|x64)`
684
-
4. Then click the green Button (GO) to launch the sample app.
685
-
5. VM\* error page may launch, just ignore and click go. (Ignore VM\* file in general and click go at any stage).
686
-
6. Go to `Scenario -> Script Debugging -> JavaScript`
687
-
7. Expect debugger to hit and pause the page.
688
-
689
-
##### [VSCode] Single WebView JavaScript Debugging (New Tool: JavaScript Debugger Nightly)
690
-
691
-
Test Single WebView JavaScript Debugging with new debugging tool: [JavaScript Debugger Nightly](https://github.com/microsoft/vscode-js-debug) in VSCode
692
-
693
-
1. Open VSCode, go to extension and download the new JavaScript Debugger Nightly tool
2. Go to same folder where sample app `WebView2APISample.exe` lives and open file `ScenarioJavaScripDebugIndex.js` from the same folder. Set a breakpoint on `function OnAddClick()`
696
-
3. In VSCode, go to Debug tab. On the top drop down, select `JavaScript Debugger(Nightly): Sample app (Script $(Configuration)|$(Platform))`. (eg. `Debugger For Microsoft Edge: Sample app (Script Debug|x64)`
697
-
4. Then click the green Button (GO) to launch the sample app.
698
-
5. VM\* error page may launch, just ignore and click go. (Ignore VM\* file in general and click go at any stage).
699
-
6. Go to `Scenario -> Script Debugging -> JavaScript`
700
-
7. Expect debugger to hit and pause the page.
701
-
702
-
##### [VSCode] Single WebView TypeScript Debugging (Old Tool: Debugger For Microsoft Edge)
703
-
704
-
Test Single WebView TypeScript Debugging with old debugging tool: [Debugger For Microsoft Edge](https://github.com/microsoft/vscode-edge-debug2) in VSCode
705
-
706
-
1. Open VSCode, go to extension and download the old Edge Script Debugging tool
2. Go to same folder where sample app `WebView2APISample.exe` lives and open file `ScenarioTypeScripDebugIndex.ts` from the same folder. Set a breakpoint on `function onHeaderClick()`
709
-
3. In VSCode, go to Debug tab. On the top drop down, select `Debugger For Microsoft Edge: Sample app (Script $(Configuration)|$(Platform))`. (eg. `Debugger For Microsoft Edge: Sample app (Script Debug|x64)`
710
-
4. Then click the green Button (GO) to launch the sample app.
711
-
5. VM\* error page may launch, just ignore and click go. (Ignore VM\* file in general and click go at any stage).
712
-
6. Go to `Scenario -> Script Debugging -> TypeScript`
713
-
7. Click on `Get Current Page Header` button
714
-
8. Expect debugger to hit and pause the page.
715
-
716
-
##### [VSCode] Single WebView TypeScript Debugging (New Tool: JavaScript Debugger Nightly)
717
-
718
-
Test Single WebView TypeScript Debugging with new debugging tool: [JavaScript Debugger Nightly](https://github.com/microsoft/vscode-js-debug) in VSCode
719
-
720
-
1. Open VSCode, go to extension and download the new JavaScript Debugger Nightly tool
2. Go to same folder where sample app `WebView2APISample.exe` lives and open file `ScenarioTypeScripDebugIndex.ts` from the same folder. Set a breakpoint on `function onHeaderClick()`
723
-
3. In VSCode, go to Debug tab. On the top drop down, select `JavaScript Debugger(Nightly): Sample app (Script $(Configuration)|$(Platform))`. (eg. `Debugger For Microsoft Edge: Sample app (Script Debug|x64)`
724
-
4. Then click the green Button (GO) to launch the sample app.
725
-
5. VM\* error page may launch, just ignore and click go. (Ignore VM\* file in general and click go at any stage).
726
-
6. Go to `Scenario -> Script Debugging -> TypeScript`
727
-
7. Click on `Get Current Page Header` button
728
-
8. Expect debugger to hit and pause the page.
676
+
##### [VSCode] Debugging Setup
677
+
678
+
1. Open VSCode, go to `View -> Extensions` and install the two debuggers:
679
+
1. [Debugger For Microsoft Edge](https://github.com/microsoft/vscode-edge-debug2)
1. Go to `File -> Open Folder` and open `WebView2APISample/` (where `.vscode/` lives)
684
+
1. Open files `ScenarioJavaScripDebugIndex.js` and `ScenarioTypeScripDebugIndex.ts` from the same output folder where `WebView2APISample.exe` lives (e.g. `WebView2APISample/Release/x64/`)
685
+
1. Set breakpoints at `function OnAddClick()` in `ScenarioJavaScripDebugIndex.js` and `function OnHeaderClick()` in `ScenarioTypeScripDebugIndex.ts`
686
+
1. Go to Debug tab via `View -> Run`
687
+
688
+
##### [VSCode] Single WebView JavaScript Debugging
689
+
690
+
Test Single WebView JavaScript Debugging with [Debugger For Microsoft Edge](https://github.com/microsoft/vscode-edge-debug2) and [JavaScript Debugger Nightly](https://github.com/microsoft/vscode-js-debug) in VSCode
1. On the top drop down, select `$(Debugger): Sample app (Script $(Configuration)|$(Platform))`. (e.g. `Debugger For Microsoft Edge: Sample app (Script Debug|x64)` and `JavaScript Debugger(Nightly): Sample app (Script Release|x64)`)
1. Press `F5` or click the green Button (GO) to Start Debugging
697
+
1. Expected: sample app is launched
698
+
1. VM\* error page may launch, just ignore and click go (Ignore VM\* file in general and click go at any stage)
699
+
1. Go to `Scenario -> Script Debugging -> JavaScript`
700
+
1. Click `Add a new item`
701
+
1. Expect debugger to hit the breakpoint and pause the page
702
+
703
+
##### [VSCode] Single WebView TypeScript Debugging
704
+
705
+
Test Single WebView TypeScript Debugging with [Debugger For Microsoft Edge](https://github.com/microsoft/vscode-edge-debug2) and [JavaScript Debugger Nightly](https://github.com/microsoft/vscode-js-debug) in VSCode
1. On the top drop down, select `$(Debugger): Sample app (Script $(Configuration)|$(Platform))`. (e.g. `Debugger For Microsoft Edge: Sample app (Script Debug|x64)` and `JavaScript Debugger(Nightly): Sample app (Script Release|x64)`)
0 commit comments