Visual Studio 2019 👷🏼♂️👷🏼♀️
Useful Shortcuts
action | shortcut |
---|---|
search | ctrl + t |
quick fix | ctrl + . or alt + enter |
remove unused imports | ctrl + . (while cursor is over imports) |
add new item | ctrl + shift + a |
comment selection | ctrl + k, ctrl + c |
uncomment selection | ctrl + k, ctrl + u |
fold all | ctrl + m, ctrl + o |
unfold all | ctrl + m, ctrl + p |
code tidy | ctrl + k, ctrl + e |
--- |
Debugging
Shortcuts
action | keys |
---|---|
run to cursor | ctrl + f10 |
skip over | f10 |
step into | f11 |
step out | shift + f11 |
Environment
The following windows are very useful (add them while in debugger -> menu -> debug -> windows)
- autos
- locals
- call stack
- memory view
C++ : (can drag pointers into memory view, can right click in memory view to change it's format)
Breakpoints
click on gear icon - can then choose conditional or hit count break points
Edit & Continue
Can edit code while debugging. This works in simpler code, but more complicated code (e.g. when using threading) will likely need the debugging process to be restarted.
Testing
action | shortcut |
---|---|
run test | ctrl + R, T (cursor must be in test to run) |