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

Breakpoint behaviours odd for local function #1678

Closed
cateyes99 opened this issue Aug 1, 2017 · 6 comments
Closed

Breakpoint behaviours odd for local function #1678

cateyes99 opened this issue Aug 1, 2017 · 6 comments

Comments

@cateyes99
Copy link

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.1)

Product Information:
 Version:            1.0.1
 Commit SHA-1 hash:  005db40cd1

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.11
 OS Platform: Darwin
 RID:         osx.10.11-x64
 Base Path:   /usr/local/share/dotnet/sdk/1.0.1

VS Code version: 1.14.2
C# Extension version: 1.11.0

Steps to reproduce

I have the below piece of code, and set up breakpoints at Line 12, 14.
image

After running and debugging it as shown below, the breakpoints at Line 14 automatically moves to Line 18! If i hit F5, it does break at Line 14 though, but note: now during debugging, I cannot set up any breakpoint in the local function as usual, for example at Line 15! Outside the local function I can set up breakpoints as usual.
image

After finishing debugging, the breakpoint setup previous at Line 14 won't come back, instead stay at Line 18 as shown below. So next time, if I re-run and debug it, it won't break at Line 14 any more!
image

Expected behavior

Breakpoints setup in local functions before debugging shouldn't be moved outside it after starting debugging.

During debugging, should be able to set up breakpoints for the statements in local functions

Actual behavior

Very odd

@cateyes99
Copy link
Author

cateyes99 commented Aug 1, 2017

Also I noticed the feature Trigger Parameter Hints Space does not trigger parameter hints at all for a call to a local function. And when type the call to it, no IntelliSense provided as well!

@gregg-miskelly gregg-miskelly added this to the 1.13 milestone Aug 8, 2017
@gregg-miskelly
Copy link
Contributor

I think I know what is happening - that line will actually be in two functions according to the debug info -- the inner function and the outer function. I believe vsdbg is actually setting the breakpoint in both places, but it is only reporting the breaking in the outer function to the UI. The result is that the breakpoint will really be set in both spots, but there will be no indicator for the first spot, and the breakpoint will appear to move (and really will move after we restart debugging).

We should be able to tweak our logic to prefer the inner function as a better match.

@gregg-miskelly
Copy link
Contributor

I have a fix for the debugger issue. @DustinCampbell should @cateyes99 open a separate issue for the completion issue (see his second comment), or is that already tracked somewhere else?

@DustinCampbell
Copy link
Member

We need a separate issue for that.

gregg-miskelly added a commit to gregg-miskelly/vscode-csharp that referenced this issue Aug 15, 2017
This includes the following changes:
1. Run the debugger on .NET Core 2.0 RTW (instead of preview2)
2. Breakpoint binding disambiguation fix (dotnet#1678)
3. Sending 'process' event (requested by VS For Mac team)
4. Entry point event stopping reason
gregg-miskelly added a commit to gregg-miskelly/vscode-csharp that referenced this issue Aug 15, 2017
This includes the following changes:
1. Run the debugger on .NET Core 2.0 RTW (instead of preview2)
2. Breakpoint binding disambiguation fix (dotnet#1678)
3. Sending 'process' event (requested by VS For Mac team)
4. Entry point event stopping reason
@gregg-miskelly
Copy link
Contributor

@cateyes99 if you wouldn't mind please create a new bug for the parameter hints issue.

gregg-miskelly added a commit that referenced this issue Aug 15, 2017
* Update debugger to 1.13.0 package

This includes the following changes:
1. Run the debugger on .NET Core 2.0 RTW (instead of preview2)
2. Breakpoint binding disambiguation fix (#1678)
3. Sending 'process' event (requested by VS For Mac team)
4. Entry point event stopping reason

* Update changelog for Debugger 1.13.0
@cateyes99
Copy link
Author

@gregg-miskelly a new issue #1715 created as per u ask. cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants