Can't debug the Razor helper - it seems IIS is not compiling with debugging symbols?

I am trying to debug a Razor helper function that runs locally in IIS.

Even when my helper code reads:

System.Diagnostics.Debugger.Break();

A breakpoint does not occur.

Therefore, I think this is due to the fact that IIS cannot compile the function in debug mode.

I added this to web.config, but this does not solve the problem:

<compilation debug="true"></compilation>

Sure, someone else has come across this, or is it just my specific computer error.

Thank! - Brian

+5
source share
1 answer

I realized this, man, that wild goose chase!

I forgot the @ symbol when calling the assistant. My code looked like this:

MyHelper()

But it should look like this:

@MyHelper()

, Razor , , , , , "@", .

, ...

, - 2 .: - (

+9

All Articles