简体   繁体   中英

Visual studio interpret breakpoints in JavaScript files

What I am trying to do is insert debugger statements in place of breakpoints (Those little red dots on the left of a file) in a JS file that that is part of a VS Solution.

Then when a build is run the debug symbols are converted to the javascript 'debugger' which will cause the execution to break.

Let me know if more info is required.

If I unserstand you correctly, you would actually like to explicitly convert breakpoints into debugger statements. I don't think there is any really easy way to do this, but the answer to this question points in the right direction. However, you're on your own parsing that .suo file.

One caveat is if you use a build event to do this, very often you don't build for .aspx pages and you effectively never build for .js pages, so your build event triggered converter will often miss new breakpoints. Maybe consider some other mechanism of triggering this, like an HttpModule that will process the .aspx or .js file whenever it gets requested.

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