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

Stepping into constructors broken #3443

Closed
dwilliamson opened this issue Apr 10, 2019 · 6 comments
Closed

Stepping into constructors broken #3443

dwilliamson opened this issue Apr 10, 2019 · 6 comments
Labels
more info needed The issue report is not actionable in its current state

Comments

@dwilliamson
Copy link

Issue Type: Bug

Stepping into constructors seems to step elsewhere. See this example:

StepInto

Actions taken:

  • Press F5 to launch debugger and hit initial breakpoint.
  • F10 to game::Host constructor.
  • F11 to step into constructor.
  • Subsequent F10 presses are not stepping on any code.

The only way to work around this is to put a breakpoint inside the constructor itself:

F5Step

Actions taken:

  • Press F5 to launch debugger and hit initial breakpoint.
  • Press F5 again to jump to next breakpoint in the constructor.
  • Subsequent F10 steps on correct code.

In cases where the constructor has initializers the separation is worse.

It appears to be stepping through some prologue code: if I continue to press F10 in the first example it will eventually end up back at the constructor entry-point, allowing me to continue debugging.

Extension version: 0.22.1
VS Code version: Code 1.33.0 (0dd516dd412d42323fc3464531b1c715d51c4c1a, 2019-04-04T15:14:28.026Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz (12 x 3398)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.91GB (18.92GB free)
Process Argv
Screen Reader no
VM 0%
@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Apr 11, 2019

What is your debugger "type"? I'm not reproing this with the cppvsdbg. Are you able to step into library constructors such as std::lock_guard?

@sean-mcmanus sean-mcmanus added the more info needed The issue report is not actionable in its current state label Apr 11, 2019
@dwilliamson
Copy link
Author

It's cppvsdbg and I'm using Visual Studio 12.0.

Compiler command-line is:

cl.exe /c /showIncludes /errorReport:none /nologo /W3 /MTd /EHsc /arch:IA32 /fp:precise /Zp8 /Gd /Zi /GR- /Od /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_WARNINGS /FC /Fdvc100.pdb

Linker command-line is:

link.exe /ERRORREPORT:NONE /VERBOSE:LIB /SAFESEH /DEBUG /NOLOGO /MACHINE:x86 /OPT:NOREF /OPT:NOICF /SUBSYSTEM:WINDOWS /NODEFAULTLIB

If it makes a difference I'm using my own CRT but that shouldn't affect codegen.

@sean-mcmanus
Copy link
Collaborator

Does this repro with 0.21.0 or earlier? We updated our cppvsdbg in 0.22.0 in order to support the newer C++17 language features like structured bindings (see #3197 ), which may have regressed older compilers.

@dwilliamson
Copy link
Author

I just tried these versions:

0.22.0
0.21.0
0.16.0

It repros on all of them. Interestingly, where it steps varies between builds; I've had one constructor step off beyond the end of a file.

I have never really paid attention to stepping into constructors before, but I do know that it works on x64/Linux.

I might be able to get a simple repro.

@sean-mcmanus
Copy link
Collaborator

It's possible it could be a bug with how the pdb info is generated with that compiler, i.e. you might try a newer compiler?

Our debugger team is pretty busy with other stuff, so I don't know if they'll have time to investigate a repro.

@dwilliamson
Copy link
Author

I have the same issue with WinDbg and I'm sure this is new behaviour.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
more info needed The issue report is not actionable in its current state
Projects
None yet
Development

No branches or pull requests

2 participants