This is the Word Count example build with Fable. It was cloned from acormier/vscode-fable-sample and modified to work with the .NET SDK 3 and later, Rollup instead of Webpack and Fable 3.
Run the following commands:
# Restore .NET tools
dotnet tool restore
# Restore JavaScript packages
npm install
Now, open VS Code and hit F5 to start another instance of VS Code. This experimental instance will have the extension loaded and the debugger attached to it. When starting the "Launch Extension" configuration, VS Code will run the build
NPM script, which will transpile and bundle the source code and write the resulting JavaScript code to the out/
directory.
-
Get the debugger to work with F# code
When setting breakpoints in F# code, the execution stops at the correct location, but the editor jumps to the transpiled JavaScript code. Breakpoints in ES2015 code, as seen in the
src/formatter.js
file, work correctly. -
Start Rollup in watch mode
That would allow editing the source code and simply reloading the VS Code extension host to see the changes.