Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Macro to run specific Run configuration

I have several Run configuration's in PyCharm:

  • one is for celery
  • second is for restarting rabbit
  • third is for main script run

Do not ask me why I need these configurations, I just want to use 3 shortcuts to run three Run configuration's separately.

So I decided to create macros for each one. But macro does not record choosing specific Run configuration.

Any ideas?

like image 632
hasam Avatar asked Oct 15 '25 20:10

hasam


1 Answers

Macro

  1. Open the run configurations menu (F10 in my setup)
  2. Type the name of the config to run
  3. Press enter

Run config pycharm macro

Bug on Mac OS

Not sure who could be impacted, but I ran into an annoying bug on the old macbook I'm hanging on to: Pycharm correctly receives each key at recording time (as can be seen in the macro window). But when replaying, instead of inputing the chars it seems to 'type' using my keyboard layout (BÉPO, french), using QWERTY locations !

Workaround:

  1. Switch your computer to QWERTY
  2. Run the macro recording
  3. Type the config name as with your usual keyboard
  4. Press enter (although the run config window will probably no longer be showing anything)
  5. Stop recording
  6. Switch back to your usual keyboard

For my example, my working macro is saying Typing: "ka;iqrc" !

like image 99
Arnaud P Avatar answered Oct 18 '25 23:10

Arnaud P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!