aboutsummaryrefslogtreecommitdiff
path: root/files/fr/archive/web/javascript/extensions_microsoft/debug/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/archive/web/javascript/extensions_microsoft/debug/index.html')
-rw-r--r--files/fr/archive/web/javascript/extensions_microsoft/debug/index.html140
1 files changed, 140 insertions, 0 deletions
diff --git a/files/fr/archive/web/javascript/extensions_microsoft/debug/index.html b/files/fr/archive/web/javascript/extensions_microsoft/debug/index.html
new file mode 100644
index 0000000000..94eaeffe88
--- /dev/null
+++ b/files/fr/archive/web/javascript/extensions_microsoft/debug/index.html
@@ -0,0 +1,140 @@
+---
+title: Debug
+slug: Archive/Web/JavaScript/Extensions_Microsoft/Debug
+tags:
+ - JavaScript
+ - Microsoft
+ - Non-standard
+ - Reference
+translation_of: Archive/Web/JavaScript/Microsoft_Extensions/Debug
+---
+<div>{{JSRef}}{{non-standard_header}}</div>
+
+<div class="warning"><strong>Attention !</strong><br>
+L'objet <code>Debug</code> ne fonctionne qu'avec Internet Explorer et les applications Windows 8 et Windows Phone 8.1.</div>
+
+<p>L'objet <strong><code>Debug</code></strong> est un objet global qui permet d'envoyer des informations au débogueur.</p>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<p>L'objet <code>Debug</code> n'est pas instancié, il fournit des propriétés et méthodes statiques.</p>
+
+<p>Différents outils permettent de déboguer les applications Internet Explorer et Windows 8.x Store. Pour les applications Windows 8.x Store, les méthodes statiques <code>write</code> et <code>writeln</code> fournies par <code>Debug</code> permettent d'afficher des chaînes de caractères dans le volet <em>Output</em> de Visual Studio lors de l'exécution.</p>
+
+<p>Pour déboguer des scripts Internet Explorer, il faut avoir un débogueur de script installé et le script exécuté en mode <em>debug</em>. Internet Explorer 8 et les versions ultérieures possèdent un débogueur JavaScript inégré.</p>
+
+<p>Si le script n'est pas en cours de débogage, les méthodes et propriétés de <code>Debug</code> n'auront pas d'effet.</p>
+
+<h2 id="Constantes">Constantes</h2>
+
+<h3 id="Codes_de_statut_pour_les_fonctions_de_rappel_asynchrones">Codes de statut pour les fonctions de rappel asynchrones</h3>
+
+<table>
+ <tbody>
+ <tr>
+ <th>Constante</th>
+ <th>Description</th>
+ <th>Valeur</th>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE</td>
+ <td>La tâche synchrone a affecté une fonction de rappel ou une continuation à exécuter dans une opération asynchrone.</td>
+ <td>0</td>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_CALLBACK_STATUS_JOIN</td>
+ <td>La tâche synchrone a rejoint une partie d'une opération asynchrone.</td>
+ <td>1</td>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_CALLBACK_STATUS_CHOOSEANY</td>
+ <td>La tâche synchrone a satisfait au choix d'une opération asynchrone.</td>
+ <td>2</td>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_CALLBACK_STATUS_CANCEL</td>
+ <td>La tâche synchrone a été annulée.</td>
+ <td>3</td>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_CALLBACK_STATUS_ERROR</td>
+ <td>La tâche synchrone a provoqué une erreur dans une opération asynchrone</td>
+ <td>4</td>
+ </tr>
+ </tbody>
+</table>
+
+<h3 id="Codes_de_statut_pour_les_opérations_asynchrones">Codes de statut pour les opérations asynchrones</h3>
+
+<table>
+ <tbody>
+ <tr>
+ <th>Constante</th>
+ <th>Description</th>
+ <th>Valeur</th>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_OP_STATUS_SUCCESS</td>
+ <td>L'opération asynchrone a réussi.</td>
+ <td>1</td>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_OP_STATUS_CANCELED</td>
+ <td>L'opération asynchrone a été annulée.</td>
+ <td>2</td>
+ </tr>
+ <tr>
+ <td>Debug.MS_ASYNC_OP_STATUS_ERROR</td>
+ <td>L'opération asynchrone a déclenché une erreur.</td>
+ <td>3</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Propriétés">Propriétés</h2>
+
+<dl>
+ <dt><a href="/fr/docs/Web/JavaScript/Reference/Debug/debuggerEnabled"><code>Debug.debuggerEnabled</code></a></dt>
+ <dd>Cette propriété indique si le débogage est actif pour le contexte de script courant. Le débogage peut être actif ou non, qu'un débogueur soit attaché ou non.</dd>
+ <dt><a href="/fr/docs/Web/JavaScript/Reference/Debug/setNonUserCodeExceptions"><code>Debug.setNonUserCodeExceptions</code></a></dt>
+ <dd>Cette propriété indique si certains blocs <code>try-catch</code> de la portée courante sont considérés par le débogueur comme étant gérés par l'utilisateur.</dd>
+</dl>
+
+<h2 id="Méthodes">Méthodes</h2>
+
+<dl>
+ <dt><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/Debug/msTraceAsyncCallbackCompleted"><code>Debug.msTraceAsyncCallbackCompleted</code></a></dt>
+ <dd>Indique si la pile d'appel pour les fonctions de rappel associée a une opération asynchrone précédemment définie est terminée.</dd>
+ <dt><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/Debug/msTraceAsyncCallbackStarting"><code>Debug.msTraceAsyncCallbackStarting</code></a></dt>
+ <dd>Associe une pile de fonction de rappel à l'opération asynchrone précédemment définie.</dd>
+ <dt><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/Debug/msTraceAsyncOperationCompleted"><code>Debug.msTraceAsyncOperationCompleted</code></a></dt>
+ <dd>Indique qu'une opération asynchrone est terminée.</dd>
+ <dt><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/Debug/msTraceAsyncOperationStarting"><code>Debug.msTraceAsyncOperationStarting </code></a></dt>
+ <dd>Initie une trace pour une opération asynchrone.</dd>
+ <dt><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/Debug/msUpdateAsyncCallbackRelation"><code>Debug.msUpdateAsyncCallbackRelation</code></a></dt>
+ <dd>Met à jour la relation entre la tâche synchrone et l'opération asynchrone associée.</dd>
+ <dt><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/Debug/write"><code>Debug.write</code></a></dt>
+ <dd>Envoie une chaîne de caractères au débogueur du script.</dd>
+ <dt><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/Debug/writeln"><code>Debug.writeln</code></a></dt>
+ <dd>Envoie une chaîne de caractères au débogueur du script, cette chaîne sera suivie par un retour à la ligne.</dd>
+</dl>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Afficher_la_valeur_dune_variable">Afficher la valeur d'une variable</h3>
+
+<p>Le fragment de code suivant permet d'afficher la valeur d'une variable lorsqu'on débogue le script grâce à la fonction <code>write</code>.</p>
+
+<pre class="brush:js">var compteur = 42;
+Debug.write("Compteur vaut " + compteur);</pre>
+
+<h2 id="Prérequis">Prérequis</h2>
+
+<p>Cette fonctionnalité est prise en charge pour les modes : Quirks, Internet Explorer 6 en mode standard, Internet Explorer 7 en mode standard, Internet Explorer 8 en mode standard, Internet Explorer 9 en mode standard, Internet Explorer 10 en mode standard et Internet Explorer 11 en mode standard. Elle est également prise en charge pour les applications Store (Windows 8 et Windows Phone 8.1).</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li><code><a href="/fr/docs/Web/JavaScript/Microsoft_JavaScript_extensions/debugger">debugger</a></code></li>
+ <li><a href="/fr/docs/Web/JavaScript/Extensions_JavaScript_Microsoft">Les extensions JavaScript spécifiques de Microsoft</a></li>
+</ul>