Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!