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

docs: add debugging page describing various flags / strategies to help debugging compiler or a program #785

Open
timotheecour opened this issue Jul 16, 2021 · 1 comment

Comments

@timotheecour
Copy link
Owner

timotheecour commented Jul 16, 2021

lots of debugging tools can help understand and debugging the compiler or other programs:

stacktraces

  • --stacktrace
  • --stackTraceMsgs
  • -d:nimCompilerStacktraceHints

misc

  • -d:debug

print data structures

  • astalgo.debug

instrument compiler

  • -d:nimDebugUtils

tracing

links

@juancarlospaco
Copy link
Collaborator

repr for stuff without $

--experimental:strictFuncs can help to find unwanted mutations.

-d:stressOrc ?.

-d:danger for JavaScript targets, because in debug mode, it contains too much noise for run-time checking.

{.exportc.} to skip name manglings of symbols, for debug only.

Styled debug messages to paint bugs red

jsAssert for JS-native assert

Debugger to set debug breakpoints

Temporarily mark symbols with {.deprecated.} to see where is used on the code base.

--expandArc

--expandMacro

not nil may help with read-from-nil bugs.

{.explain.}

Using stricter types, at least temporarily.

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

2 participants