简体   繁体   中英

How VSCode debugger stepin to open a new file?

I am implementing a vscode debugger, with stepin function, I need to step into a new file, but I don't know how it works now, how it opens a new file for step into? and another question, this new file will be loaded from server dynamically, it is not in the local workspace. I don't know how to do it in DAP? please help!! Thanks!

I have the answer and post here for a reference.

VSCode use StackTraceRequest to set the stop line number and file.

It will be called after a stopped event.

so for the response of StackTraceRequest, we can set the StackFrame object, and the source object in it is for file.

https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame

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