This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ptvsd | |
# attach to VS Code debugger if this script was run with BOKEH_VS_DEBUG=true | |
if os.environ['BOKEH_VS_DEBUG'] == 'true': | |
# 5678 is the default attach port in the VS Code debug configurations | |
print('Waiting for debugger attach') | |
ptvsd.enable_attach(address=('localhost', 5678), redirect_output=True) | |
ptvsd.wait_for_attach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ptvsd | |
# attach to VS Code debugger if this script was run with BOKEH_VS_DEBUG=true | |
if os.environ['BOKEH_VS_DEBUG'] == 'true': | |
# 5678 is the default attach port in the VS Code debug configurations | |
print('Waiting for debugger attach') | |
ptvsd.enable_attach(address=('localhost', 5678), redirect_output=True) | |
ptvsd.wait_for_attach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To use this with QuickAdd, you need to also create a capture in QuickAdd that reads in the output of this macro | |
// In the bottom of the capture, in the "Format" box, add {{MACRO:github-issue-macro}} (or however you register the macro. | |
module.exports = async (params) => { | |
const { app } = params; | |
let file = app.workspace.getMostRecentLeaf()?.view?.file; | |
if (!file) { | |
return; | |
} |