开发者

eclipse: Run/Debug current file

In search of a Python debugger I stumbled 开发者_JAVA技巧upon Aptana, which is based on eclipse.

Often, I want to debug a single python script. However, Aptana won't let me run/debug the currently opened file directly.

Instead, it requires me to create a debug/run configuration for each file I would like to run/debug. Alternatively I could create a Python project in Aptana.

But: I don't want to. I just want to be able to run or debug the currently opened file. This way I would like to debug my scripts without being forced to create a project first (for each single script!).

Can it be that hard?


This is because Aptana/Eclipse doesn't "realize" that the file you opened should be debugged using the Python debugger as it's not associated with a Python project/perspective (there's a lot of environment setup when a project is created in Aptana/Eclipse).

The simplest solution, IMO, would be to create a simple sandbox Python project and just stick your files in there to run/debug. Aptana should then realize you're dealing with Python and start running the Python debugger without setup (that's my experience w/ PyDev in Eclipse, at any rate).


See: Run External Python Programs with Eclipse PyDev (note: you really need a project, but your file doesn't need to be in it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜