IDEs & Debugging

Shortcuts

In the course so far we've introduced a large number of different buttons, menus and shortcuts. These can all be hard to find on the screen or remember the shortcuts for. As you use the IDE more, you'll find the subset of commands that you use often.

I recommend trying to discover the shortcuts for any command you regularly run. Using the keyboard rather than the mouse can speed up certian tasks tremendously. The easiest way to discover the shortcuts for a command is to either look next to the name of the command if it's in a menu or hover over it if it's a button.

Switch files

One of the more common taks you will do is switch between files you're working on.

Press Ctrl+Shift+N and it will open a dialog:

PyCharm Open File

Press Ctrl+P and it will open a dialog:

VS Code Open File

In this dialog box, you can type the name of any file and then press enter or click on the name in the list. You can type partial file names like te li and it will be able to match against test_lists.py.

Run commands

As we have seen, there are hundreds of actions that an IDE can do. To make it easier to find them and not have to search through the menus you can simply search for them.

Press Shift twice and a dialog box similar to the open files box will open. In here you can search for any commands, settings, files or even symbols like function names. Try searching for add_arrays for example.

Press Ctrl+Shift+P and VS Code's Command Palette will open. Here you can search for any command or setting. We used it earlier for telling VS Code to use pytest.

You can also use Ctrl+P and then type a > to get to the same place.

These search windows are also really useful as if you search for a command, it will also tell you the shortcut for that action next to it's name.