Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Develop and Debug Atom Package

Tags:

atom-editor

I have just began working on Atom.io Package development, and based on this tutorial, have learnt from how to create package development skelton file to how to publish your package.

However, I do not know how to check/debug/develop your package. I know I can use Jasmine via alt-cmd-I or Developer Console (for Atom is based on Chromium), still if you want to check the behavior of your package, do I have to re-publish or install your package manually every time?

like image 909
kenju Avatar asked Sep 06 '15 22:09

kenju


People also ask

How do I debug an Atom package?

Open the debug view by pressing ctrl+alt+d , selecting 'Toggle Debugging' from the Command Palette or php-debug menu. Start the script with Xdebug enabled. If everything is setup correctly, the entire line of the breakpoint will be highlighted in green, indicating the current line of the script.

Can you debug in Atom?

Debugging. To use a Python debugger in Atom, you will need to install the python-debugger package. Once installed, turn on the debugger by going to Packages -> python-debugger -> Toggle .


1 Answers

When working on packages locally, here's the recommended workflow:

  • Clone your package from GitHub using apm develop <package-name>. This will clone the package's repo to your local ~/.atom/dev/packages/<package-name>
  • cd into this directory
  • Start Atom in this directory using atom -d .

Now you can work on the package, make changes, etc. Once you're ready to reload, you can use View > Developer > Reload Window to restart Atom with the changed package.

If you have your package sources locally on your machine, you can skip the first step (apm develop) and simply create a symbolic link from your sources to ~/.atom/dev/packages/<package-name.

like image 148
nwinkler Avatar answered Oct 06 '22 00:10

nwinkler