Example: i'd like to always see "CPU Registers" and never see "Scripting Console".
Using Code::Blocks, how can i do this, regardless of the project i use?
You realize the CPU register window won't show anything unless you're actually debugging right?
Anyway, to save a perspective in C::B, setup the IDE to the layout you want and just save it. In your case, you would do something like the follow:
have the debug toolbar visible. Enable it by going
to View->Toolbars->Debugger.
display CPU window from debugger toolbar. Find 'Debugging
windows'->'CPU Registers'.
Hide the scripting console. Go to View->Script Console and uncheck.
Set the layout to your preference and save. Go to View->Perspectives->Save current. Give it a name.
The next time you start C::B it'll use the last perspective you were on when you quit. So make sure you exit C::B with the new saved perspective.
Related
I have ctrl+f2 mapped to toggle bookmark in my vscode keyboard shortcuts.
{ "key": "ctrl+f2", "command": "bookmarks.toggle", "when": "editorTextFocus" },
It work correctly on Linux and Windows, but not on macOs.
I have enabled the setting to switch function keys (f1, f2, etc) to behave as standard function keys.
I have then unmapped ctrl+f2 in macOs keyboard shortcut settings.
But still ctrl+f2 keyboard shortcut is not registering with vscode.
Troubleshooting VS-Code Keybinding Issues
The best way to troubleshoot an issue with Keybindings in V.S. Code is to use the tool that was created for solving keybinding issues
The tool is simply named: "Keyboard Shortcut Troubleshooting Tool"
The tool comes with V.S. Code "out of the box", as a result; no downloading, or installation is needed. To use the tool you just activate it from the Quick Input Menu that drops open by pressing the F1-Key. If you cannot find it your self I posted instructions below, and an image. If you can find it yourself, then skip the "Activating the Troubleshooting Tool" Section, and go ahead and read, "Effectively Troubleshooting Issues with the Troubleshoot Keyboard-Shortcut Tool"
Activate V.S. Code's Troubleshooting Tool
Hit the F1-Key
When the quick input drops open type the following into the text input:
"Toggle Keyboard Shortcuts Troubleshooting"
Select the option: Developer: Toggle Keyboard Shortcuts Troubleshooting
It should automatically open the OUTPUT panel, which is located in the same panel that your terminal is. Make sure that the OUTPUT is set to LOG(Window) in the drop down. (I took a picture and posted it below if you can't find the Keyboard Shortcut Troubleshooter).
The image might have funny declensions because I am on a dual monitor setup with 1 1080x1920 curved screen and one 1080x720 screen.... I cropped it to a STD HD 1920 width.
HELPFUL SIDE NOTE:
"This tool may be the most verbose program ever written, as far as I can tell, it logs data to the OUTPUT Console each & every time you activate a keyboard event. Truth be told, I find this tool to be extremely distracting, and very annoying. Because of this, it is important to note, that even if you switch out of your OUTPUT console to your terminal or something. The Troubleshooter is still actively logging to the OUTPUT Console. Make sure when you are finished to turn it off."
Turning off the Keyboard Troubleshooter, requires the same process as turning it on.
Using V.S. Code's Troubleshooter
STEP-1: Close VS Code
This is not to be confused with reload V.S. Code. The only mechanism that VS-Code has for reloading its-self, doesn't provide the same functionality as closing, and reopening V.S. Code. The two are similar, but they are not equal (discussion for another time).
actually stop its process from running by hitting the X in the upper right corner of the title-bar, or hit
**[Alt + F4].
Step-2: Reopen V.S. Code W/O Any Extensions
Don't worry, you won't have to uninstall anything. You will start V.S. Code from the command-line though. Open up your bash terminal, or Powershell, and enter the following command:
$ code --disable-extensions
V.S. Code should start almost immediately
If the V.S. Code CLI doesn't open your editor, or this doesn't disable your extensions, you should refer to this link
Step-3: Start the Keyboard Shortcut Troubleshooter
I already explained this step above, so their is no reason to go over it again. Do make sure you have your panel open, and the OUTPUT tab is selected. You should see a bunch of logging being output, in the VS-Code output (that is redundant sounding), logging when you use any keybinding. The drop-down should have Log(Window) showing, as the current log selected.
Step-4: Test Your Keybinding
At this point you can use your keybinding, and get results. They might not be the results that you were hoping for, but the troubleshooter should give you details as to what is happening when you use your keyboard shortcut (aka bound-key, aka key-binding).
Step-5:
Fix the issue by opening the Keyboards Shortcuts configuration file by opening the quick input, (like I described above for the troubleshooter), and type Keyboard Shortcuts. Their will be two options, one is the default Keybindings that cannot be written too, the other is a configuration file, where you are allowed to overwrite all of the default keybindings if you choose. Look in the default keybinding.json file and make sure the keybinding that you feel is assigned to a certain task, really is assigned to it. Look in the regular keybindings.json file, and make sure if anything is written in it, that those keybindings are not affecting the keybinding that is not working for you. Use the information from the troubleshooter to help guide you through the process.
These links below further elaborate on V.S. Code keybindings:
V.S. Code Community Docs (Community Contributed)
V.S. Code Official Docs (Keybindings)
When I'm using the built-in console in RubyMine, if the commands I type exceed a certain amount of characters the console will cease to display new characters.
I've looked through all the RubyMine settings for a 'wrap' option for the console but I don't seem to be able to find one.
Please help if you know where such an option is located. It's rather annoying not to be able to see half of a long command.
You can tell the IRB console to use soft wraps or not. When the console window is the active window, either
click the button with a picture of three sliders
or
go to Help -> Find Action.
enter "use soft wraps"
hit return
to toggle soft wrapping between off and on.
(In general, you can sometimes find RubyMine functionality that you wish existed by searching in the search box in the upper left of the Preferences dialog. I found "Use Soft Wraps" (which I didn't know existed until just now) by searching for "wrap".)
Unfortunately, in my hands, this setting doesn't affect the Terminal window, which always wraps for me -- maybe that's what you're talking about.
I just started a new task at a "lower level" in the platform stack, and I'm getting started with windbg. I'm so far quite happy with the pure power of the debugger. However, I wish it would just save my session default, like the VS debugger does. What I want is that whenever I ".restart", or re-open windbg, it works just like I left it: same bp's, same sxe state, same files open in the same places, etc.
I know about "save workspace" which seems to do what I want, but it's manual, and I have to do it every time I make a change to the workspace state.
Is there a way to just have windbg do this automatically?
It should prompt the first time you close the session and ask you if you want to save your workspace, there is a checkbox like the image here.
If you click yes this time and the box 'Don't ask again in this WinDbg session' then it will automatically save your workspace, similarly you can also clear the workspaces if it's erroneously saved some breakpoints or paths that you are no longer interested.
Also you can set this in the options like so:
Microsoft NTDebugging Blog. Uncovering How Workspaces Work in WinDbg.
Often in MATLAB I turn on 'automatic' debugging with dbstop if error. When an error occurs, the function enters debug mode, and I am able to query the variables in the command window and see exactly what is going on. Very useful.
However, when this occurs, the focus switches to the editor. To me this seems counter-intuitive; we are in debug mode, so I want to find out what is going on, not look at the code (which I can already see in the adjacent window). I always immediately tab back to the command window.
So my first question is: Is there any point in accessing the editor at this point? What can I usefully do, when my script has crashed, in the editor?
And secondly: If I want to, can I change MATLAB's default behaviour to keep the focus in the command window?
To your second question:
If you use MATLAB's desktop environment, just deselect "Open Files when Debugging" in the "Debug" menu.
If you use MATLAB without the graphical desktop you can change this preference by modifying your matlab.prf file. This file stores preferences set from the GUI. The menu option described above makes the same changes as the manual process described below.
NOTE: Editing this file is entirely unsupported. Do so at your own risk.
Open the file from the MATLAB command prompt,
>> edit([prefdir '/matlab.prf'])
Or use the prefdir command in MATLAB to find the directory and then open the file in whatever editor you prefer.
Search for a line that says
EditorGraphicalDebugging=Btrue
Change it to read
EditorGraphicalDebugging=Bfalse
If the line doesn't exist, add it to the file.
Restart MATLAB.
You can use the invocation stack to see how you came about to the particular error position. Sure, you can use dbup and dbdown for this in the command window, but it's much easier in the editor.
Also, seeing the variables (and their values, using mouse hover) in the context of the code that caused the crash is far better for understanding the root cause of the error than just seeing the static values.
I can answer only your first question.
Things you can do in the editor:
Mouse hover a variable, which pops up a 'quick view' window.
Any action you can do when not in debug mode, treating the function as a script - running a line (highlight + F9), running a code block, etc.
What is your biggest pet peeve related to the windbg debugger from microsoft?
(note: I actually really like windbg if I ignore the unpolished UI.)
Attempting to dock a window is almost always the wrong kind of dock the first time until :I move the mouse just right. Why can't it have the docking cues that VS2008 has?
The ridiculous behavior when you attempt to use click-drag to select text on a line that is wider than its physical window.
The pieces of the history window that I need to copy/paste into bug reports are frequently wider than the physical window. I've gotten so used to the triple-click workaround that I find myself attempting to misuse triple click in other (well behaved) applications.
Key presses are ignored while the focus is in a source window. It's not like you can edit the source code from inside windbg. At least there's the Alt-1 workaround.
How insanely slow .kdfiles copies new binaries across the 1394 connection. It can take up to one minute for a large dll.
Not being able to switch from output window to command window using a key press, I read that 'Alt+1' should work but it doesn't always so I always have to resort to using the mouse. Also sometimes it doesn't remember when I tell it not to ask me everytime if I want to save the workspace when I quit.