Skip to content
This repository

Debugger snippets #19

Closed
wants to merge 3 commits into from

2 participants

Chris Adams Michael Sheets
Chris Adams
  • stdlib pdb and code.interact
  • ipython shell
  • bpython bpdb extended debugger
added some commits January 22, 2013
Chris Adams Snippet: bpdb debugger
bpdb is like pdb but modern
d901bef
Chris Adams Snippet: ipython
Now "ipy<tab>" will insert the code to invoke ipython in the local context
bb98a73
Chris Adams Snippet: pdb & interact 2d3d621
Michael Sheets
Owner

Other than the ipython snippet I'm not sure about the coding style of these snippets. While I understand that the module must be imported if seems this is typically done in a different place, usually at the top of the file, and at least not on the same line as it's use.

Michael Sheets

Closing due to lack of follow-up.

Michael Sheets infininight closed this September 04, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 3 unique commits by 1 author.

Jan 22, 2013
Chris Adams Snippet: bpdb debugger
bpdb is like pdb but modern
d901bef
Chris Adams Snippet: ipython
Now "ipy<tab>" will insert the code to invoke ipython in the local context
bb98a73
Chris Adams Snippet: pdb & interact 2d3d621
This page is out of date. Refresh to see the latest.
16  Snippets/bpdb.tmSnippet
... ...
@@ -0,0 +1,16 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3
+<plist version="1.0">
  4
+<dict>
  5
+	<key>content</key>
  6
+	<string>import bpdb; bpdb.set_trace()</string>
  7
+	<key>name</key>
  8
+	<string>bpdb</string>
  9
+	<key>scope</key>
  10
+	<string>source.python</string>
  11
+	<key>tabTrigger</key>
  12
+	<string>bpdb</string>
  13
+    <key>uuid</key>
  14
+    <string>F9D4CC08-FE65-42F5-8B8E-17F255EA3FC1</string>
  15
+</dict>
  16
+</plist>
16  Snippets/interact.tmSnippet
... ...
@@ -0,0 +1,16 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3
+<plist version="1.0">
  4
+<dict>
  5
+	<key>content</key>
  6
+	<string>import code; code.interact(local=locals())</string>
  7
+	<key>name</key>
  8
+	<string>interact</string>
  9
+	<key>scope</key>
  10
+	<string>source.python</string>
  11
+	<key>tabTrigger</key>
  12
+	<string>interact</string>
  13
+	<key>uuid</key>
  14
+	<string>78CDBA56-81F0-4A8B-941D-F20B1562C6BA</string>
  15
+</dict>
  16
+</plist>
17  Snippets/ipython.tmSnippet
... ...
@@ -0,0 +1,17 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3
+<plist version="1.0">
  4
+<dict>
  5
+	<key>content</key>
  6
+	<string>from IPython.Shell import IPShellEmbed
  7
+ipshell = IPShellEmbed()(local_ns=locals(), global_ns=globals())</string>
  8
+	<key>name</key>
  9
+	<string>ipy</string>
  10
+	<key>scope</key>
  11
+	<string>source.python</string>
  12
+	<key>tabTrigger</key>
  13
+	<string>ipy</string>
  14
+	<key>uuid</key>
  15
+	<string>14A77A30-2E2F-4818-AD24-00EA37E18475</string>
  16
+</dict>
  17
+</plist>
16  Snippets/pdb.tmSnippet
... ...
@@ -0,0 +1,16 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3
+<plist version="1.0">
  4
+<dict>
  5
+	<key>content</key>
  6
+	<string>import pdb; pdb.set_trace()</string>
  7
+	<key>name</key>
  8
+	<string>pdb</string>
  9
+	<key>scope</key>
  10
+	<string>source.python</string>
  11
+	<key>tabTrigger</key>
  12
+	<string>pdb</string>
  13
+	<key>uuid</key>
  14
+	<string>C191029C-84B5-47BE-8688-EE9DF64054E8</string>
  15
+</dict>
  16
+</plist>
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.