It depends on how your application is run.

• If it's a standard Client-Server application, you need to set the following in Web.config:

1
2
3

<configuration>
<system.web>
<compilation debug="true" />
• If it's an Owin application, then you can pass Debug = true to your WebSharper Owin options.

• If it's a Single-Page Application, then you can just change the URL of the script tag in index.html.

By on 12/19/2016 1:11 AM ()

I run it in Suave. I tried to run this (from Self Hosted Client Server template) - I added Debug option on true - but it don't work - I have still minified versions.

1
2
3
4
5
6
7
8
9

        let opts = WebSharperOptions()
opts.Debug <- true
opts.ServerRootDirectory <- rootDirectory
appB.UseStaticFiles(
StaticFileOptions(
FileSystem = PhysicalFileSystem(rootDirectory)))
.UseSitelet(rootDirectory, Site.Main)
.UseWebSharper(opts)
|> ignore)
By on 12/19/2016 2:21 AM ()

For Owin middleware, you can use WebSharperOptions together with UseWebSharper instead of UseSitelet and set Debug to true.

1
2
3
4
5
6
7
8
9
10
11
12

let startup (app: IAppBuilder) =
let webSharperOptions =
WebSharperOptions<_>(
ServerRootDirectory = rootDirectory,
Sitelet = Some Site.Main,
BinDirectory = ".",
Debug = true
)

app.UseWebSharper(webSharperOptions)
.UseStaticFiles(StaticFileOptions(FileSystem = PhysicalFileSystem(rootDirectory)))
|> ignore

Your issue is that you are calling the two following:

1
2

.UseSitelet
.UseWebSharper

Remove .UseSitelet and pass your sitelet via WebSharperOptions and it should work.

By on 12/19/2016 7:26 AM ()

Thank you - it works as you described Mariusz

By on 12/20/2016 5:02 AM ()