GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Debugging a script Debugging a script
Glenn Block edited this page
This document explains by example the steps required to use Visual Studio to debug .csx files that are executed with scriptcs. Hopefully you won't need to debug very often, but if you are in need be sure to follow this example. You may also like to comment on the feature request at https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/7848117-add-scriptcs-csx-intellisense-and-debugging-in-v scriptcs offers an out of the box solution for debugging and executing scripts with Visual Studio, using the Below is a screenshot showing :openvs in action.
The new Visual Studio "Open Folder" allows you to open a folder containing .csx files and quickly edit them (with full syntax highlighting and IntelliSense), you cannot debug a selected script with F5 out of the box. Luckily, there's a new Visual Studio Extension called AnyScriptCs, which adds debugging support for .csx files to Visual Studio "15"! Here's how to get started:
A file called launch.json will open. We need to specify the path to scriptcs.exe inside the file like this: {
"version": "0.2.0",
"configurations": [
{
"name": "HelloWorld.csx",
"project": "HelloWorld.csx",
"scriptcs_exe": "C:\\path\\to\\scriptcs.exe"
}
]
}Save the file, and press F5!
Note: This section is kept here for historical purposes, but this approach is no longer needed with the :openvs command
Note: Visual Studio "15" which was announced at Build 2016 introduces a new feature called "Open Folder", allowing you to quickly open a folder containing arbitrary files. Read below about how to enable scriptcs debugging for "Open Folder" in Visual Studio "15".
That's it, the breakpoint will be hit. You have all the goodness of VS, such as the Immediate Window, Add Watch to help you debugging.
Clone this wiki locally |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |