Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify & update "Debug WebView2 apps with Visual Studio" #3233

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

mikehoffms
Copy link
Contributor

@mikehoffms mikehoffms commented Jul 22, 2024

Rendered article for review:

Changes made by this PR:

  • Fixed Issue Wrong screenshot #2775 so that the last png shows a VS screenshot, not a VS Code screenshot.
  • Added "Summary of high-level steps" at top.
  • Updated the article to focus on VS 2022, not 2019.
  • Added all specific steps to reproduce the screenshots; provided the specific steps to follow to use the main wv2 sample (while also allowing to apply to user's own app code base).
    • Instead of abstract steps referring to user's own code base, w/ pngs showing an unspecified code base (turns out to be main wv2 sample).
    • Made article maintainable & testable.
  • Added the missing prerequisite steps (as links) for setting up a new machine that are needed trying to follow the article:
    • Install VS.
      • Which version? was unclear; do install VS 2022 (just mention that 2019 is supported).
    • Clone samples repo.
      • In order to provide & follow specific steps. Enables maintenance & testing the article.
    • Install C++ workload.
      • Or other platform workload.
      • May or may not have been done previous to arriving at this article.
    • Compile & run main sample.
      • To use the main sample here, it's best if you already got it compiled & running per sample's article. In this article, just build on that milestone.
      • Starting state: Have the WebView2Samples solution open, WebView2APISample sample app (project) not running.

AB#52806681 - PR Tracking item
AB#45948351 - Issue Tracking item

@mikehoffms mikehoffms added cat: webview2 WebView-related content. in-progress labels Jul 24, 2024
@mikehoffms mikehoffms changed the title Update png in "Debug WebView2 apps with Visual Studio" Clarify new machine setup using VS 2022 w/o VS 2019 Jul 26, 2024
microsoft-edge/webview2/how-to/debug-visual-studio.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/how-to/debug-visual-studio.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/how-to/debug-visual-studio.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/how-to/debug-visual-studio.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/how-to/debug-visual-studio.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/how-to/debug-visual-studio.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/samples/webview2apissample.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/samples/webview2apissample.md Outdated Show resolved Hide resolved
microsoft-edge/webview2/samples/webview2apissample.md Outdated Show resolved Hide resolved
@mikehoffms mikehoffms changed the title Clarify new machine setup using VS 2022 w/o VS 2019 Show VS not VS Code png in "Debug WebView2 apps with Visual Studio" Aug 1, 2024
@mikehoffms mikehoffms changed the title Show VS not VS Code png in "Debug WebView2 apps with Visual Studio" Clarify & update "Debug WebView2 apps with Visual Studio" Aug 6, 2024

The breakpoint in the `onAddClick` function is hit, and the app is paused in the debugger.

1. Switch to the Visual Studio window, and examine the debugger panes.
Copy link
Contributor Author

@mikehoffms mikehoffms Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When walking through the end-to-end steps in revised article, I never did get the debugger to halt at breakpoint, after I clicked Add Item in the running wv2 sample app.
@captainbrosset

Nice to do: Patrick do the steps in PR's article, see if hits breakpoint. See if article gives the usage info that the article ideally should give, about why we're setting a breakpoint, and what exactly eg we can do in the debugger panes (I never arrived at useful debugger panes UX).

Doing these steps would be informative for you to experience how the main wv2 sample app is meant to be used - at least, read the article re: that. Sample user has to figure out which menuitem in app to click (hundreds of menuitems), to get to webpage/code on which breakpoint is set, & how to interact w/ webpage to trigger breakpoint.

rendered article section:
https://review.learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/debug-visual-studio?branch=pr-en-us-3233#debug-your-webview2-app

check the settings in
https://review.learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/debug-visual-studio-images/enb-js.png

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat: webview2 WebView-related content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants