This is our first release of WebSharper 3.0-alpha with a new feature: source mapping. If you enable it on your project, you can see the F# sources in your browser and set breakpoints in it.
You can enable including source maps and the required source files in a WebSharper assembly, by adding the
<WebSharperSourceMap>True</WebSharperSourceMap>
property to your project file.
To unpack the source maps in your web project, add this same property to the project file, and
<staticContent>
<mimeMap fileExtension=".fs" mimeType="text/plain" />
</staticContent>
inside the web.config
file's <system.webServer>
element.
It is also recommended to set
<OtherFlags>--quotations-debug</OtherFlags>
to have source position information inside reflected definitions available for WebSharper. Otherwise only the starting lines of functions can be mapped.
Single-Page Application projects are currently not supported.
In Google Chrome, you need to check the "Enable JavaScript source maps" setting in Developer Tools Settings.
For Internet Explorer, you need to have Windows 8.1 Update 1.
websharper.exe
also has new flag -sm
for source map embedding/unpacking.
ObsoleteWithMessage
function, with it you can specify a message for the obsolete warning.Can’t find what you were looking for? Drop us a line.