by drakinite » Sun Mar 13, 2022 1:31 am
Hi, welcome to MM addon development!
- To use the Ctrl + Alt + Shift shortcut, and to get the "Inspect Element" menu item, you need to install a debug build from the test builds thread:
https://www.mediamonkey.com/forum/viewt ... 86639&sd=d
- However, on a non-debug build, you can still open the debug console. In a browser window, navigate to
http://localhost:9222. To inspect the main window, click on mainwindow.html.
- All the "Developer mode" toggle does is disable the automatic sending of crash logs. (It's certainly useful, but won't let you view the console.)
Re restarting MM: The short answer is yes, but there's a long answer:
- Any code that runs
in the main window, like in actions_add.js, or if you define new controls in controls/(filename).js,
will require you to restart MediaMonkey when you change it.
- However, code that defines
dialogs is automatically reloaded every time the dialog window opens. So if you change dialogs/myDialog.js or dialogs/myDialog.html, your changes will take effect the next time you open the dialog.
-
However however, the above statement does not hold for code in separate scripts, such as controls. Let's say you create a control called colorPicker (assume colorPicker doesn't already exist in MM) in controls/colorPicker.js, and you're calling it from your dialog. If you make changes to controls/colorPicker.js, the changes won't take effect because those scripts are cached.
If you don't already have Refresh Skin Shortcut installed, I'd recommend it:
https://www.mediamonkey.com/addons/brow ... -shortcut/
By default, clicking the button will refresh LESS (skin files). But if you right click the button, you can do a full window reload. You can change its default behavior by opening its settings panel in Tools > Addons.
Hi, welcome to MM addon development!
- To use the Ctrl + Alt + Shift shortcut, and to get the "Inspect Element" menu item, you need to install a debug build from the test builds thread: https://www.mediamonkey.com/forum/viewtopic.php?f=6&t=86639&sd=d
- However, on a non-debug build, you can still open the debug console. In a browser window, navigate to http://localhost:9222. To inspect the main window, click on mainwindow.html.
- All the "Developer mode" toggle does is disable the automatic sending of crash logs. (It's certainly useful, but won't let you view the console.)
Re restarting MM: The short answer is yes, but there's a long answer:
- Any code that runs [i]in the main window[/i], like in actions_add.js, or if you define new controls in controls/(filename).js, [b]will[/b] require you to restart MediaMonkey when you change it.
- However, code that defines [i]dialogs[/i] is automatically reloaded every time the dialog window opens. So if you change dialogs/myDialog.js or dialogs/myDialog.html, your changes will take effect the next time you open the dialog.
- [i][u]However however[/u][/i], the above statement does not hold for code in separate scripts, such as controls. Let's say you create a control called colorPicker (assume colorPicker doesn't already exist in MM) in controls/colorPicker.js, and you're calling it from your dialog. If you make changes to controls/colorPicker.js, the changes won't take effect because those scripts are cached.
If you don't already have Refresh Skin Shortcut installed, I'd recommend it: https://www.mediamonkey.com/addons/browse/item/refresh-skin-shortcut/
By default, clicking the button will refresh LESS (skin files). But if you right click the button, you can do a full window reload. You can change its default behavior by opening its settings panel in Tools > Addons.