Skip to content

Commit

Permalink
improved debugging on windows, passing of custom python path to debug…
Browse files Browse the repository at this point in the history
…ger, support relative paths for custom paths in auto complete
  • Loading branch information
DonJayamanne committed Feb 6, 2016
1 parent 88c6853 commit c139898
Show file tree
Hide file tree
Showing 28 changed files with 7,196 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"runtimeArgs": [
"--harmony"
],
"program": "./out/client/debugger/main.js",
"program": "./out/client/debugger/vs/vsdebugger.js",
"stopOnEntry": false,
"args": [
"--server=4711"
Expand Down
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python
Linting, Debugging, Intellisense, auto-completion, code formatting, snippets, unit testing, and more.
Linting, Debugging (multi threaded, web apps), Intellisense, auto-completion, code formatting, snippets, unit testing, and more.
Works on both Windows and Mac.

##Features
Expand All @@ -8,13 +8,16 @@ Works on both Windows and Mac.
* Code formatting (autopep8, yapf, with config files)
* Renaming, Viewing references, Going to definitions, Go to Symbols
* View signature and similar by hovering over a function or method
* Debugging with support for local & global variables, arguments, expressions, watch window, stack information, break points
* Debugging with support for local variables, arguments, expressions, watch window, stack information, break points
* Debugging Multiple threads (Web Applications, etc) and expanding values in watch windows is supported on Windows
* Unit testing (unittests and nosetests, with config files)
* Sorting imports
* Snippets

## Issues and Feature Requests
## Issues and Feature Requests
[Github Issues](https://github.com/DonJayamanne/pythonVSCode/issues)
* Remote Debugging (coming soon)
* Improved debugging for Mac (in development)

## Feature Details (with confiuration)
* IDE Features
Expand All @@ -28,6 +31,13 @@ Works on both Windows and Mac.
* - Support for docstring
* - Ability to include custom module paths (e.g. include paths for libraries like Google App Engine, etc)
* - - Use the setting python.autoComplete.extraPaths = []
* - - For instance getting autocomplete/intellisense for Google App Engine, add the following to your settings file:
```json
"python.autoComplete.extraPaths": [
"C:/Program Files (x86)/Google/google_appengine",
"C:/Program Files (x86)/Google/google_appengine/lib"
]
```
* Code formatting
* - Use either yapf or autopep8 for code formatting (defaults to autopep8)
* - auutopep8 configuration files supported
Expand All @@ -44,7 +54,9 @@ Works on both Windows and Mac.
* - Evaluate Expressions
* - Step through code (Step in, Step out, Continue)
* - Add/remove break points
* - Local variables, Global variables and arguments (experimental, still needs some polishing)
* - Local variables and arguments
* - Multiple Threads and Web Applications (such as Flask) (only Windows at this stage)
* - Expanding values (viewing children, properties, etc) again only Windows at this Stage
* Unit Testing
* - unittests (default is on)
* - nosetests (default is off)
Expand All @@ -59,6 +71,10 @@ Works on both Windows and Mac.

![Image of Renaming and Find all References](https://raw.githubusercontent.com/DonJayamanne/pythonVSCode/master/images/rename.gif)

![Image of Debugging](https://raw.githubusercontent.com/DonJayamanne/pythonVSCode/master/images/standardDebugging.gif)

![Image of Multi Threaded Debugging](https://raw.githubusercontent.com/DonJayamanne/pythonVSCode/master/images/flaskDebugging.gif)

## Requirements
* Python is installed on the current system
* - Path to python can be configured
Expand All @@ -78,6 +94,12 @@ Works on both Windows and Mac.

## Change Log

### Version 0.2.0
* Improved debugger for Windows, with support for Multi threading, debugging Multi-threaded apps, Web Applications, expanding properties, etc
* Added support for relative paths for extra paths in additional libraries for Auto Complete
* Fixed a bug where paths to custom Python versions weren't respected by the previous (PDB) debugger
* NOTE: PDB Debugger is still supported

### Version 0.1.3
* Fixed linting when using pylint

Expand Down
Binary file added images/flaskDebugging.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/standardDebugging.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 60 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "python",
"displayName": "Python",
"description": "Linting, Debugging, Intellisense, auto-completion, code formatting, snippets, and more.",
"version": "0.1.3",
"description": "Linting, Debugging (multi-threaded), Intellisense, auto-completion, code formatting, snippets, and more.",
"version": "0.2.0",
"publisher": "donjayamanne",
"license": "SEE LICENSE IN LICENSE or README.MD",
"homepage": "https://github.com/DonJayamanne/pythonVSCode/blob/master/README.md",
Expand Down Expand Up @@ -54,13 +54,13 @@
"debuggers": [
{
"type": "python",
"label": "Python",
"label": "Python (pdb)",
"enableBreakpointsFor": {
"languageIds": [
"python"
]
},
"program": "./out/client/debugger/main.js",
"program": "./out/client/debugger/pdb/debuggerMain.js",
"runtime": "node",
"configurationAttributes": {
"launch": {
Expand All @@ -73,23 +73,76 @@
"description": "Workspace relative path to a text file.",
"default": "__init__.py"
},
"pythonPath": {
"type": "string",
"description": "Path (fully qualified) to python executable. Use this if you want to use a custom pthon executable version.",
"default": ""
},
"stopOnEntry": {
"type": "boolean",
"description": "Automatically stop after launch.",
"default": true
},
"args": {
"type": "array",
"description": "List of arguments for the program",
"default": []
}
}
}
},
"initialConfigurations": [
{
"name": "Python",
"name": "Python (Pdb)",
"type": "python",
"request": "launch",
"program": "__init__.py",
"stopOnEntry": true
}
]
},
{
"type": "python_windows",
"label": "Python (Windows)",
"enableBreakpointsFor": {
"languageIds": [
"python"
]
},
"program": "./out/client/debugger/vs/VSDebugger.js",
"runtime": "node",
"configurationAttributes": {
"launch": {
"required": [
"program"
],
"properties": {
"program": {
"type": "string",
"description": "Workspace relative path to a text file.",
"default": "__init__.py"
},
"pythonPath": {
"type": "string",
"description": "Path (fully qualified) to python executable. Use this if you want to use a custom pthon executable version.",
"default": ""
},
"args": {
"type": "array",
"description": "List of arguments for the program",
"default": []
}
}
}
},
"initialConfigurations": [
{
"name": "Python (Windows)",
"type": "python_windows",
"request": "launch",
"program": "__init__.py"
}
]
}
],
"configuration": {
Expand Down Expand Up @@ -224,7 +277,7 @@
"type": "string",
"default": "yapf",
"description": "Path to yapf, you can use a custom version of yapf by modifying this setting to include the full path."
},
},
"python.autoComplete.extraPaths": {
"type": "array",
"default": [],
Expand Down Expand Up @@ -253,6 +306,7 @@
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./ && installServerIntoExtension ./out ./src/server/package.json ./src/server/tsconfig.json"
},
"dependencies": {
"long": "^3.0.3",
"named-js-regexp": "^1.3.1",
"tmp": "0.0.28",
"vscode-debugadapter": "^1.0.1",
Expand Down
Loading

0 comments on commit c139898

Please sign in to comment.