Making your .NET language step correctly in the debugger

前端 未结 2 1763
再見小時候
再見小時候 2021-01-29 23:23

Firstly, I apologize for the length of this question.

I am the author of IronScheme. Recently I have been working hard on emitting decent debug info, so that I can use

2条回答
  •  庸人自扰
    2021-01-30 00:02

    I am an engineer on the Visual Studio Debugger team.

    Correct me if I am wrong, but it sounds like the only issue left is that when switching from PDBs to the .NET 4 dynamic compile symbol format some breakpoints are being missed.

    We would probably need a repro to exactly diagnose the issue, however here are some notes that might help.

    1. VS (2008+) can-to run as a non-admin
    2. Do any symbols load at all the second time around? You might test by breaking in (through exception or call System.Diagnostic.Debugger.Break())
    3. Assuming that symbols load, is there a repro that you could send us?
    4. The likely difference is that the symbol format for dynamic-compiled code is 100% different between .NET 2 (PDB stream) and .NET 4 (IL DB I think they called it?)
    5. The 'nop's sound about right. See rules for generating implicit sequence points below.
    6. You don't actually need to emit things on different lines. By default, VS will step 'symbol-statements' where, as the compiler writer you get to define what 'symbol-statement' means. So if you want each expression to be a separate thing in the symbol file, that will work just fine.

    The JIT creates an implicit sequence point based on the following rules: 1. IL nop instructions 2. IL stack empty points 3. The IL instruction immediately following a call instruction

    If it turns out we do need a repro to solve your issue, you can file a connect bug and upload files securely through that medium.

    Update:

    We are encouraging other users experiencing this issue to try the Developer Preview of Dev11 from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27543 and comment with any feedback. (Must target 4.5)

    Update 2:

    Leppie has verified the fix to work for him on the Beta version of Dev11 available at http://www.microsoft.com/visualstudio/11/en-us/downloads as noted in the connect bug https://connect.microsoft.com/VisualStudio/feedback/details/684089/.

    Thanks,

    Luke

提交回复
热议问题