Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

119
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda