La version courte
- Le débogage commence par un symptôme reproductible. Ces prompts demandent des hypothèses, un test ciblé et la plus petite modification permettant d’expliquer la panne.
- Ne transmettez jamais d’identifiants, de données client privées ou de dépôts propriétaires complets à un assistant non autorisé. Exécutez les commandes et les tests proposés dans votre environnement. Un correctif plausible ne prouve pas que la modification fonctionne.
Le débogage commence par un symptôme reproductible. Ces prompts demandent des hypothèses, un test ciblé et la plus petite modification permettant d’expliquer la panne.
Ne transmettez jamais d’identifiants, de données client privées ou de dépôts propriétaires complets à un assistant non autorisé. Exécutez les commandes et les tests proposés dans votre environnement. Un correctif plausible ne prouve pas que la modification fonctionne.
Comment utiliser cette collection
Choisissez la tâche la plus proche de votre travail. Copiez le prompt, remplacez la scène ou le contexte générique par vos informations et conservez les contraintes utiles pour évaluer le résultat. Modifiez une variable à la fois afin d’identifier ce qui s’améliore.
Cette méthode reprend les recommandations du guide de prompt engineering de GitHub Copilot : fournir un contexte précis et vérifier la réponse, sans supposer qu’un premier résultat soigné est correct.
Prompts de diagnostic
Cette série porte sur le diagnostic. Fournissez votre code et votre commande de test avant de valider la réponse.
1. Une valeur nulle qui fait planter une page
Help with a null value crashing a page in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
2. Une conversion de fuseau horaire décalée d’un jour
Help with a timezone conversion off by one day in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
3. Une réponse 401 intermittente
Help with an intermittent 401 response in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
4. Une concurrence entre deux enregistrements
Help with a race between two saves in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
5. Un élément de liste absent après filtrage
Help with a missing list item after filtering in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
6. Une page lente sous charge
Help with a slow page under load in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
7. Un lien profond défectueux
Help with a broken deep link in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
8. Un analyseur refusant une entrée valide
Help with a parser rejecting valid input in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
9. Une réponse de cache périmée
Help with a stale cached response in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.
10. Un téléversement fonctionnant seulement en local
Help with an upload that works only locally in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then state competing hypotheses, request a minimal reproduction and identify evidence that separates them. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez le scénario de reproduction proposé avant d’appliquer un correctif.

Prompts de mise en œuvre
Cette série porte sur la mise en œuvre. Fournissez votre code et votre commande de test avant de valider la réponse.
11. Une valeur nulle qui fait planter une page
Help with a null value crashing a page in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
12. Une conversion de fuseau horaire décalée d’un jour
Help with a timezone conversion off by one day in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
13. Une réponse 401 intermittente
Help with an intermittent 401 response in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
14. Une concurrence entre deux enregistrements
Help with a race between two saves in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
15. Un élément de liste absent après filtrage
Help with a missing list item after filtering in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
16. Une page lente sous charge
Help with a slow page under load in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
17. Un lien profond défectueux
Help with a broken deep link in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
18. Un analyseur refusant une entrée valide
Help with a parser rejecting valid input in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
19. Une réponse de cache périmée
Help with a stale cached response in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.
20. Un téléversement fonctionnant seulement en local
Help with an upload that works only locally in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then make the smallest change that satisfies the stated behavior and show a focused diff. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Vérifiez que le diff ne contient ni modification hors sujet ni accès aux données non prévu.

Prompts de test des limites
Cette série porte sur les tests de limites. Fournissez votre code et votre commande de test avant de valider la réponse.
21. Une valeur nulle qui fait planter une page
Help with a null value crashing a page in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
22. Une conversion de fuseau horaire décalée d’un jour
Help with a timezone conversion off by one day in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
23. Une réponse 401 intermittente
Help with an intermittent 401 response in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
24. Une concurrence entre deux enregistrements
Help with a race between two saves in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
25. Un élément de liste absent après filtrage
Help with a missing list item after filtering in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
26. Une page lente sous charge
Help with a slow page under load in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
27. Un lien profond défectueux
Help with a broken deep link in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
28. Un analyseur refusant une entrée valide
Help with a parser rejecting valid input in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
29. Une réponse de cache périmée
Help with a stale cached response in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
30. Un téléversement fonctionnant seulement en local
Help with an upload that works only locally in my existing codebase. Ask for the relevant file, expected behavior, actual behavior and test command if I have not supplied them. Then add unit or integration cases for empty, invalid and concurrent inputs as appropriate. Preserve public interfaces unless evidence requires a change. Show assumptions, a focused diff and the exact command I should run. Do not invent files, test results or security guarantees.Vérification : Exécutez les tests et, si possible, vérifiez qu’ils échouent avant le correctif.
Que vérifier avant d’utiliser le résultat
Ne transmettez jamais d’identifiants, de données client privées ou de dépôts propriétaires complets à un assistant non autorisé. Exécutez les commandes et les tests proposés dans votre environnement. Un correctif plausible ne prouve pas que la modification fonctionne.
Si le résultat ne répond pas à la tâche, raccourcissez le prompt et précisez l’information ou la contrainte manquante. Conservez la version utilisée pour pouvoir reproduire le visuel final ou la modification du code.
Pour aller plus loin
Poursuivre avec un guide associé
Mise en pratique
Votre prochaine étape
Lire la suite
Guide connexe50 prompts d’IA pour les développeursVous avez une question ou une correction?
Contacter Thrive


