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

VSCode should only reset breakpoints after save when already debugging #8077

Closed
nojvek opened this issue Jun 24, 2016 · 7 comments
Closed

VSCode should only reset breakpoints after save when already debugging #8077

nojvek opened this issue Jun 24, 2016 · 7 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@nojvek
Copy link
Contributor

nojvek commented Jun 24, 2016

Here's a proposal for debugAdapters to support Edit on Idle, Edit and Continue scenarios.

Only reset the breakpoints after the file has been saved rather than every keystroke.

Notify the debugAdapter with an extra afterEdit:true arg in setBreakpoints

The debugAdapter can then asynchronously come back when it the new edited code is all mapped.

@dbaeumer dbaeumer added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jun 24, 2016
@isidorn isidorn added the feature-request Request for new features or functionality label Jun 24, 2016
@isidorn
Copy link
Contributor

isidorn commented Jun 24, 2016

Assigning first to @weinand to add protocol additions - if all looks good there then I can make changes on the vscode side.

@isidorn isidorn assigned weinand and unassigned isidorn Jun 24, 2016
@weinand
Copy link
Contributor

weinand commented Jun 24, 2016

@nojvek please correct me if I'm wrong but the purpose of the afterEdit flag is to help the adapter distinguish between the following two cases:

  • user has modified breakpoints without editing the underlying source
  • source was edited which results in new breakpoint locations

@nojvek
Copy link
Contributor Author

nojvek commented Jun 24, 2016

Hi Andre,

That is true. It's basically signaling the debugAdapter that the sourcemaps
won't be accurate so wait till the script is parsed again.

The premise is this:

The v8 vm, chakra, clr and newer VMs can hot load source with their debug
api's. Having VScode hot load code is a very attractive feature.

On Friday, June 24, 2016, Andre Weinand notifications@github.com wrote:

@nojvek https://github.com/nojvek please correct me if I'm wrong but
the purpose of the afterEdit flag is to help the adapter distinguish
between the following two cases:

  • user has modified breakpoints without editing the underlying source
  • source was edited which results in new breakpoint locations


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#8077 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA-JVMB4s5JgvZs1CbjSCMBLveUAwBx7ks5qO7K1gaJpZM4I9XTk
.

@weinand weinand added this to the July 2016 milestone Jul 4, 2016
@weinand
Copy link
Contributor

weinand commented Jul 4, 2016

@isidorn here are the details:

If breakpoints are changed and ...

  • source is not dirty then a setBreakpoints request with the attribute sourceModified set to false is issued immediately.
  • source is dirty, all breakpoint modifications are tracked but no setBreakpoints requests are issued until the next save of the source. In the meantime breakpoints are shown as unverified. After the save a single setBreakpoint request with the attribute sourceModified set to true is issued.

In both cases the result status returned from the setBreakpoints request is applied immediately.

@isidorn
Copy link
Contributor

isidorn commented Jul 4, 2016

@weinand sounds good, assigning to me so I look into it on the vscode side

@isidorn
Copy link
Contributor

isidorn commented Jul 7, 2016

@weinand just to clarify, if the auto save is turned on then the source is never dirty, sourceModified is false and requests are issued immedtly?
Also I do not see the sourceModified field added in our debugProtocol?

@weinand
Copy link
Contributor

weinand commented Jul 7, 2016

@isidorn even with auto save turned on there is a short period of time (500ms?) where the file is dirty and where breakpoints should not be updated. So I suggest that the two cases are not treated differently. Breakpoints are always updated after the next save.

I'll add the sourceModified in a moment...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants