-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Debugger can't step into a function in a given situation with Linq #62232
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @tommcdon Issue DetailsHi, i think I found a little bug, I hope this is the right place to report it. Happens for me both in VS Code and Visual Studio (2022) on Windows 10 using .net 6. .net 5, and .net Framework 4.8 has no problems with it. Not sure if it's already reported or a strange thing that only happens to me. DescriptionIt seems to happen if you have a select statement that off an The simplest way to reproduce would be something like that:
Just place a breakpoint in DoSomething and run. VS Goes into break mode: ("Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing).") - stepping seems still to work, no other error is shown VS Code : the callstack shows: "Error processing Overstepping it is completely safe Like I said, when changing the .net version to 5 or framework 4.8 the error won't occure
|
@Mucksh Thanks for the bug report! As a workaround, please try setting COMPLUS_ReadyToRun=0 in project properties. {
"profiles": {
"ConsoleApp29": {
"commandName": "Project",
"environmentVariables": {
"COMPLUS_ReadyToRun": "0"
}
}
}
} |
I'm running into this too. The workaround mentioned above doesn't seem to be making a difference for me. Here is my minimal example: var objects = new object[1];
var sum = objects.Select(f).Sum();
Console.WriteLine(sum);
double f(object o)
{
// Put a breakpoint anywhere in this function (or any nested method you call from this function).
// The debugger will hit it but not be able to show the breakpoint that it hit.
// Add any code you like here.
return 0;
} One workaround that will likely get me by is to add a call to One thing to note is that when a user runs into this, it's a bit of a challenge to figure out what the issue is in a large codebase. If I'm correct, breakpoints won't work for any nested code that gets called for the Some additional notes: I'm thinking the issue occurs when the |
One workaround that works for me is letting your source object be a In OP's code example, changing
to
led to the breakpoint inside |
In my case the issue occurs with a list.
If I cange the code as below, the debugger works well:
VS 2022, version 17.8.7 |
Hi, i think I found a little bug, I hope this is the right place to report it. Happens for me both in VS Code and Visual Studio (2022) on Windows 10 using .net 6. .net 5, and .net Framework 4.8 has no problems with it.
Not sure if it's already reported or a strange thing that only happens to me.
Description
It seems to happen if you have a select statement that off an
IEnumerable
of any type except int, when it uses a method to change the type to an int and you place aWhere
startement with any check after that.I played a little bit around and it seems only to happen with an int and didn't found other type combinations or situations where this happens.
The simplest way to reproduce would be something like that:
Just place a breakpoint in DoSomething and run.
VS Goes into break mode: ("Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing).") - stepping seems still to work, no other error is shown
VS Code : the callstack shows: "Error processing
stackTrace
request. Unknown Error 0x80131c49" - and seems to be completely stuckOverstepping it is completely safe
Like I said, when changing the .net version to 5 or framework 4.8 the error won't occure
The text was updated successfully, but these errors were encountered: