visual studio - How to break when entering own code? -
the "just code" feature permits limit debugging operations user code (unoptimized code available pdb).
is possible break whenever program flow invokes "my code" in visual studio?
potential application: when debugging issues in libraries used complex third-party application, anything called when issue occurs starting point. breaking when entering own code permit without excessive logging.
it doesn't seem so.
however, if own code within few namespaces, windbg can used workaround (the following unmanaged code; assume there's way managed code):
> bm modulename!namespacename::* will set breakpoints entry point within given namespace. if access single-threaded, windbg can print list of actual entries performed in execution:
> bm modulename!namespacename::* "bd *; ln; l+t; p \"dv; pt \\\"be *; r $retreg; g\\\"\"" will add breakpoints potential entry points automatically perform actions log , out again:
bd *disable breakpoints we're entering "own code"lnprint information call locationl+t; p "[...]"skip calling convention handlingdvprint locals (including arguments, handled)pt "[...]"skip method endbe *re-enable breakpoints we're leaving "own code"r $retreglog method result (if calling convention , result type cause result register used)gcontinue next breakpoint
from log possible @ least identify reasonable breakpoints , breakpoint conditions second debug run (in debugger, including visual studio).
Comments
Post a Comment