简体   繁体   中英

VS2017 How to debug uwp hosted web app on windows phone emulator

I built a javascript uwp hosted web app with visual studio 2017. The app is a simple javascript app with a start page pointing to one of our web servers. The server returns a page with javascript inside it. The app works fine.

In the VS2017 "DOM Explorer" window, I can see both downloaded HTML and Javascript. But, alas, I cannot figure how to add a breakpoint in the script, step next, and so on.

Is there an easy way to enable step by step debugging on such applications?

I would suggest that you could debug your app with Microsoft Edge F12 Developer Tools directly.

You could use Microsoft Edge to open your website and press F12 to open the developer tools. In the developer tools, you could switch the browser profile to windows phone in the "Emulation" tab. Then, in the debugger tab, you could add some break points to debug your javascript code in it.

If you want to debug UWP APIs, you need to use visual studio to deploy the app to your local machine, and then, you would need to start it from the start menu of windows. After the app started, you could press F12, the Edge developer tools would be opened, then, you could add some break points to debug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM