Hi,
I am very new to Dart, so I am unsure if I am doing something wrong or not, but the debugging of a Dart application does not always seem to work.
I am trying to follow along with the "Alvast, Ye Pirates" tutorial.
I have my index.html and my main.dart files.
Index.html:
<html>
<head>
<meta charset="utf-8">
<title>Pirate badge</title>
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="piratebadge.css">
</head>
<body>
<h1>Pirate badge</h1>
<div class="widgets">
<div>
<input type="text" id="inputName" maxlength="15">
</div>
</div>
<div class="badge">
<div class="greeting">
Arrr! Me name is
</div>
<div class="name">
<span id="badgeName"> </span>
</div>
</div>
<script type="application/dart" src="main.dart"></script>
<script src="packages/browser/dart.js"></script>
</body>
</html>
main.dart:
import 'dart:html';
main( )
{
querySelector( '#inputName' ).onInput.listen( updateBadge );
}
void updateBadge(Event e )
{
querySelector( '#badgeName' ).text = (e.target as InputElement).value;
}
When I click on the 'Dartium' icon that shows on the right side if I view the index.html file, the application works. If I type something in the input, the badgeName gets updated.
However, when I try to debug, it does not.
For debugging, I run 'pub serve --port=8082' from the terminal window in IntelliJ and I have created a Javascript Debug configuration with the URL 'http://localhost:8082/' and set Dartium as the browser. If I start this run configuration, the browser opens at the good URL, but the application does not work. If I type in the input field nothing happens. If I set a breakpoint, it is not hit.
Any idea what might be wrong?
regards,
Wim
PS: I am using IntelliJ 13.1.4