Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

120
Vistas
Visual Studio debugging Javascript with JSON data

I have some simple test code to prove out this weird behavior. The program runs without breakpoints. But if I set a breakpoint, it stops someplace in the json data and I can't single-step to debug my code. If I remove the json data, the breakpoints stop and I can single step from there (F10). Weird.

Here is my HTML code:

 <!DOCTYPE html>
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 <title>JSON Test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

</head>
<body>

<div id="header">
    <h2>JSON Test</h2>

    <label for="HostName">Your Node Name:</label>
    <label id="HostName" style="width: 600px;"></label> 
    <label id="Status" style="text-align: center;"></label>
    <input type="button" id="btnRefresh" value="Refresh Me" />

</div>

<script type="text/javascript">
    $(document).ready(function () {

        alert("Ready");

        alert(data.name);
    })
</script>

<script type="text/javascript">
    var data = {
        "id": 1,
        "name": "abc",
        "address": {
            "streetName": "cde",
            "streetId": 2
        }
    }
</script>
</body>
</html>

Set a breakpoint at alert ready. If you get the same results then it's an issue in Visual Studio. If not, then could it be in my method or version of VS 2017?? Strange.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

And the issue was: I set set Google Chrome as the default debug browser. I switched it back to Internet Explorer and voila, I can debug again.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda