"Unknown error" in sweetjs file using Visual Studio Web Essentials - visual-studio-2013

I'm just starting to learn about Sweet.JS, and was excited to realize it's already built into Visual Studio 2013 Web Essentials.
I decided to first make a macro to shorten anonymous functions to fn.
macro fn {
rule {
$params $body
} => {
function $params $body
}
}
Entering this in the online sweet.js editor gives me:
Visual Studio, however, is giving me the a helpful error message of "Unknown error":
I get the same error with any input I've tried, including an empty file, which is bizarre to me. I have no idea where to begin troubleshooting this issue.
At the moment, I don't know what information is relevant, but I'll be happy to edit this question to supply any information you guys need to help!
Thanks!

Related

Is it possible to debug CImageList::Read(CArchive *)?

CImageList::Read(CArchive *) returns zero in my code.
Since Read only returns zero, without additional information about the error, I was wondering if I can somehow debug into the Read with F11?
I have disabled Just My Code Debugging but debugging continues as if I did nothing. I got winctrl2.cpp not found from Visual Studio. It offered me to click on Browse, which I did, and have pointed it to the file.
Now it works, I can enter the Read method, but in it, it asks for the file commctrl.inl, offering me the popup in which I must enter the file path.
I am using Visual Studio 2019.
If you know alternative solution on how to get helpful info about the error, I will consider accepting it as an answer as well.

Can't launch debugger for Visual Studio Extension

I'm using this LinkedIn learning course https://www.linkedin.com/learning/visual-studio-code-building-an-extension/scaffolding-an-extension?u=67553434 to create an Extension. I'm creating a theme currently, so its a .json file
The course tells me to launch the debugger, but I keep getting an error saying "Cannot launch program (file path); setting the 'outFiles' attribute might help. Any idea what this means? is my file path correct?
I'm sure i'm doing something silly, so would appreciate any quick help to get me going. Thanks!

Visual Studio - disable stepping into source code of module (Shouldly)

I am using a an assertion framework called Shouldly for C#.
The code looks like this:
[Fact]
public void SimpleTest()
{
false.ShouldBe(true);
}
This is the same as:
[Fact]
public void SimpleTest()
{
Assert.True(false);
}
However, when I debug the example that uses Shouldly, this happens:
But I want this to happen:
The issue
When I debug with Shouldly, Visual Studio steps into the source code of the Shouldly package. I don't want to see the internals, I just want to see what line of the test my code broke on. I can use the Stack Trace to find what line my code broke on but this slows down my flow a lot.
I remember when I first started debugging with Shouldly, VS asked me if it should download the source files (.pdb?) of Shouldly to debug with, I think I accidentally told it yes.
If I look at the Modules I have loaded in VS, it shows me this:
It thinks Shouldly is "User Code" which is probably why it debugs into this. How can I disable this?
I have this issue every time I change VS version. I've managed to fix it before but this time I can't figure it out.
You can disable symbol loading for a loaded module by:
opening the Module window
searching for the module you want to change
right clicking on it and disabling Always Load Automatically

Visual Studio mouse over debugging doesn't work for particular variable

I am trying to debug a controller and a particular variable does not show the tooltip. I tried restarting the computer and visual studio to no avail.
[HttpPut]
[Route("{id}")]
public async Threading.Task<IHttpActionResult> Put([FromUri] Guid id, [FromBody] Api.Document documentModel)
{
var test = await PutOrStatusCodeAsync(documentModel, id).ConfigureAwait(true);
return test;
}
ALL other variables can be moused over:
But not the one I need:
I added it to the watch list and am getting "Internal error in the expression evaluator".
I found this thread: Get "Internal error in the expression evaluator" on "Add watch" function when trying to debug WCF service code (MSVS 2013), but my use Managed Compatibility Mode is greyed out!
I am running VS as an admin. HELP!
I figured it out. It was grayed out because I was currently debugging. Once I stopped the process it was available to check.

Debug assertion does not prompt in IIS 7

since moving to Windows 7 (IIS 7.5), the debug assertions do not prompt a pop up dialog anymore.
I have tested this in a separate project, and noticed that they do work when using the integrated Visual Studio Developer server (Cassini) but they do not work when using IIS Web Server.
This is a big issue for us since we are counting on debug assertions to identify potential programming errors, so any help would be appreciated.
Thanks. Eyal.
That's because failed debug assertions are displayed in the Output window now instead, under the Debug section.
To view the Output window in Visual Studio 2008 go to the 'View' menu and click 'Output'.
I also find it inconvenient. Some more info...
You can work around by using
System.Diagnostics.Debugger.Launch();
You can make for example this function
[Conditional("DEBUG")]
public static void AssertEx(bool condition, string message)
{
if (condition) return;
System.Diagnostics.Debugger.Launch();
// Still write the message on output
Debug.Fail(message);
}
and get similar results.
That is the default behavior now and it cannot be changed.
What you can is generate a file with the assertions that failed in your app. That will still help you track your issues without halting the app when running inside the IIS.
Take a look at this good article about it.

Resources