Integration pdf.js and Blazor; Debugger on Visual studio is lost

Unisign Dev Team 0 Reputation points
2024-08-14T20:38:36.4266667+00:00

Hi there,

i have a problem with the integration of blazor with pdf.js. Lately pdf.js (Developed by Mozilla) has change from .js to .mjs file. I upgraded to work with .mjs file but now i am encountering another problem. When i start the Visual Studio on debug mode, the breakpoints are working as expected but once i try to load the form where we initialized the pdf.js with the new type file (.mjs) it destroy the debugging and the breakpoints does not work anymore on every page, regardless where we are setting the breakpoint. The problem start when i wait for promise.

User's image

It shows this error

User's image

Now I do not understand if that is a problem of browser for mjs files (the code on .mjs files work perfect, I have tried with different browser and the same behavior.) i am not sure if this is a problem of blazor and mjs or of Visual studio.

Thank in advance if somebody can help me with this problem.

Unisign Dev Team

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,584 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,962 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
999 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.