IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Visual Studio Code Discussion :

Xdebug compilé ne fonctionne plus


Sujet :

Visual Studio Code

  1. #1
    Membre averti
    Homme Profil pro
    retraité
    Inscrit en
    Mars 2022
    Messages
    47
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : retraité

    Informations forums :
    Inscription : Mars 2022
    Messages : 47
    Par défaut Xdebug compilé ne fonctionne plus
    Bonjour,

    configuration:
    - ubuntu 22.04
    - php 8.1
    - IDE: VSCode

    1 - J'ai suivi ce tuto pour installer Xdebug (j'aurais pas du)
    https://php.tutorials24x7.com/blog/h...eans-on-ubuntu
    J'ai donc utilisé une version compilée de Xdebug ce que propose Xdebug
    2 - Par inadvertance, j'ai installé le paquet php-debug. Puis je l'ai désinstallé. J'ai du vider certains fichiers.
    Voici mes configurations
    php -v:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    gerard@gerard-ThinkCentre-M700:~$ php  -v
    PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.1.2, Copyright (c) Zend Technologies
        with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans
        with Zend OPcache v8.1.2-1ubuntu2.14, Copyright (c), by Zend Technologies
    gerard@gerard-ThinkCentre-M700:~$
    php -i:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    gerard@gerard-ThinkCentre-M700:~$ php --ini
    Configuration File (php.ini) Path: /etc/php/8.1/cli
    Loaded Configuration File:         /etc/php/8.1/cli/php.ini
    Scan for additional .ini files in: /etc/php/8.1/cli/conf.d
    Additional .ini files parsed:      /etc/php/8.1/cli/conf.d/10-mysqlnd.ini,
    /etc/php/8.1/cli/conf.d/10-opcache.ini,
    /etc/php/8.1/cli/conf.d/10-pdo.ini,
    ....
    /etc/php/8.1/cli/php.ini:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    [xdebug]
    xdebug.mode = debug
    xdebug.start_with_request = yes
    xdebug.client_port=9003
    xdebug.log=/tmp/xdebug.log
    /etc/php/8.1/apache2/conf.d/20-xdebug.ini :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    zend_extension=xdebug.so
    xdebug.mode = develop, debug
    xdebug.start_with_request = yes
    xdebug.log = /tmp/xdebug.log
    xdebug.client_host = "localhost"
    xdebug.client_port = 9003
    Jai hésité à utiliser le fichier /etc/php/8.1/apache2/php.ini
    plutôt que /etc/php/8.1/apache2/conf.d/20-xdebug.ini (ci-dessus), mais Xdebug conseille ce fichier

    Sur Vscode, j'ai installé PHP Debug installé launcj.json:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Listen for Xdebug",
                "type": "php",
                "request": "launch",
                "port": 9003
            },
            {
                "name": "Launch currently open script",
                "type": "php",
                "request": "launch",
                "program": "${file}",
                "cwd": "${fileDirname}"
            }
        ]
    }

    Et voici le contenu de la page web de Xdebug:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    Enabled Features
    (through 'xdebug.mode' setting)
    Feature	Enabled/Disabled	Docs
    Development Helpers	✘ disabled	🖹
    Coverage	✘ disabled	🖹
    GC Stats	✘ disabled	🖹
    Profiler	✘ disabled	🖹
    Step Debugger	✔ enabled	🖹
    Tracing	✘ disabled	🖹
    Optional Features
    Compressed File Support 	no
    Clock Source 	clock_gettime
    Diagnostic Log
    No messages
    Step Debugging	Docs
    Debugger	Active	🖹
    Connected Client	localhost:9003	 
    DBGp Settings
    Max Children	32	 
    Max Data	1024	 
    Max Depth	1	 
    Show Hidden Properties	No	 
    Extended Properties	No	 
    Notifications	No	 
    Resolved Breakpoints	No	 
    Breakpoint Details	No	 
    PHP
    Build Configuration
    Version (Run Time) 	8.1.2-1ubuntu2.14
    Version (Compile Time) 	8.1.1
    Debug Build 	no
    Thread Safety 	disabled
    Settings
    Configuration File (php.ini) Path 	/etc/php/8.1/cli
    Loaded Configuration File 	/etc/php/8.1/apache2/php.ini
    Scan this dir for additional .ini files 	/etc/php/8.1/apache2/conf.d
    Additional .ini files parsed 	/etc/php/8.1/apache2/conf.d/10-mysqlnd.ini, /etc/php/8.1/apache2/conf.d/10-opcache.ini, /etc/php/8.1/apache2/conf.d/10-pdo.ini, /etc/php/8.1/apache2/conf.d/15-xml.ini, /etc/php/8.1/apache2/conf.d/20-apcu.ini, /etc/php/8.1/apache2/conf.d/20-calendar.ini, /etc/php/8.1/apache2/conf.d/20-ctype.ini, /etc/php/8.1/apache2/conf.d/20-curl.ini, /etc/php/8.1/apache2/conf.d/20-dom.ini, /etc/php/8.1/apache2/conf.d/20-exif.ini, /etc/php/8.1/apache2/conf.d/20-ffi.ini, /etc/php/8.1/apache2/conf.d/20-fileinfo.ini, /etc/php/8.1/apache2/conf.d/20-ftp.ini, /etc/php/8.1/apache2/conf.d/20-gd.ini, /etc/php/8.1/apache2/conf.d/20-gettext.ini, /etc/php/8.1/apache2/conf.d/20-iconv.ini, /etc/php/8.1/apache2/conf.d/20-intl.ini, /etc/php/8.1/apache2/conf.d/20-mbstring.ini, /etc/php/8.1/apache2/conf.d/20-mysqli.ini, /etc/php/8.1/apache2/conf.d/20-pdo_mysql.ini, /etc/php/8.1/apache2/conf.d/20-pdo_sqlite.ini, /etc/php/8.1/apache2/conf.d/20-phar.ini, /etc/php/8.1/apache2/conf.d/20-posix.ini, /etc/php/8.1/apache2/conf.d/20-readline.ini, /etc/php/8.1/apache2/conf.d/20-shmop.ini, /etc/php/8.1/apache2/conf.d/20-simplexml.ini, /etc/php/8.1/apache2/conf.d/20-sockets.ini, /etc/php/8.1/apache2/conf.d/20-sqlite3.ini, /etc/php/8.1/apache2/conf.d/20-sysvmsg.ini, /etc/php/8.1/apache2/conf.d/20-sysvsem.ini, /etc/php/8.1/apache2/conf.d/20-sysvshm.ini, /etc/php/8.1/apache2/conf.d/20-tokenizer.ini, /etc/php/8.1/apache2/conf.d/20-xdebug.ini, /etc/php/8.1/apache2/conf.d/20-xmlreader.ini, /etc/php/8.1/apache2/conf.d/20-xmlwriter.ini, /etc/php/8.1/apache2/conf.d/20-xsl.ini, /etc/php/8.1/apache2/conf.d/20-zip.ini
    Directive	Local Value	Master Value	Docs
    xdebug.mode	debug	debug	🖹
    xdebug.start_with_request	yes	yes	🖹
    xdebug.start_upon_error	default	default	🖹
    xdebug.output_dir	/tmp	/tmp	🖹
    xdebug.use_compression	0	0	🖹
    xdebug.trigger_value	no value	no value	🖹
    xdebug.file_link_format	no value	no value	🖹
    xdebug.filename_format	no value	no value	🖹
    xdebug.log	/tmp/xdebug.log	/tmp/xdebug.log	🖹
    xdebug.log_level	7	7	🖹
    xdebug.var_display_max_children	128	128	🖹
    xdebug.var_display_max_data	512	512	🖹
    xdebug.var_display_max_depth	3	3	🖹
    xdebug.max_nesting_level	256	256	🖹
    xdebug.cli_color	0	0	🖹
    xdebug.force_display_errors	Off	Off	🖹
    xdebug.force_error_reporting	0	0	🖹
    xdebug.halt_level	0	0	🖹
    xdebug.max_stack_frames	-1	-1	🖹
    xdebug.show_error_trace	Off	Off	🖹
    xdebug.show_exception_trace	Off	Off	🖹
    xdebug.show_local_vars	Off	Off	🖹
    xdebug.dump.COOKIE	no value	no value	🖹
    xdebug.dump.ENV	no value	no value	🖹
    xdebug.dump.FILES	no value	no value	🖹
    xdebug.dump.GET	no value	no value	🖹
    xdebug.dump.POST	no value	no value	🖹
    xdebug.dump.REQUEST	no value	no value	🖹
    xdebug.dump.SERVER	no value	no value	🖹
    xdebug.dump.SESSION	no value	no value	🖹
    xdebug.dump_globals	On	On	🖹
    xdebug.dump_once	On	On	🖹
    xdebug.dump_undefined	Off	Off	🖹
    xdebug.profiler_output_name	cachegrind.out.%p	cachegrind.out.%p	🖹
    xdebug.profiler_append	Off	Off	🖹
    xdebug.cloud_id	no value	no value	🖹
    xdebug.client_host	localhost	localhost	🖹
    xdebug.client_port	9003	9003	🖹
    xdebug.discover_client_host	Off	Off	🖹
    xdebug.client_discovery_header	no value	no value	🖹
    xdebug.idekey	no value	no value	🖹
    xdebug.connect_timeout_ms	200	200	🖹
    xdebug.scream	Off	Off	🖹
    xdebug.gc_stats_output_name	gcstats.%p	gcstats.%p	🖹
    xdebug.trace_output_name	trace.%c	trace.%c	🖹
    xdebug.trace_format	0	0	🖹
    xdebug.trace_options	0	0	🖹
    xdebug.collect_assignments	Off	Off	🖹
    xdebug.collect_return	Off	Off	🖹

  2. #2
    Membre Expert
    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    1 723
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 1 723
    Par défaut
    Soit peut-être un peu plus précis sur ce qui ne fonctionne plus ....

    On voit que tu n'as activé que le debug dans le fichier php.ini donc l'affichage à la fin me semble en cohérence, si tu veux rajouter le module "Developement helpers", il faut rajouter aussi develop dans le php.ini (comme fait dans le 20-xdebug.ini)

  3. #3
    Membre averti
    Homme Profil pro
    retraité
    Inscrit en
    Mars 2022
    Messages
    47
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : retraité

    Informations forums :
    Inscription : Mars 2022
    Messages : 47
    Par défaut
    J'ai installé "PHP debug" dans VScode. Lorsque je lance un "start Debugging", les icones de débogage apparaissent. Seuls les icones pause, restart et stop sont actives. On peut placer des points d'arrêt sur le programme.
    J'ai déplacé le contenu du fichier /etc/php/8.1/apache2/conf.d/20-xdebug.ini vers /etc/php/8.1/apache2/php.ini. J'ai ajouté develop et zend_extension=xdebug.so dans /etc/php/8.1/cli/php.ini.
    Voici donc le contenu de /etc/php/8.1/apache2/php.ini et /etc/php/8.1/cli/php.ini:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    [xdebug]
    zend_extension=xdebug.so
    xdebug.mode = develop, debug
    xdebug.start_with_request = yes
    xdebug.log = /var/log/php/xdebug.log
    xdebug.client_host = localhost
    xdebug.client_port = 9003
    Cela ne marche toujours pas. xdebug.log donne toujours le même message:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    [8870] Log opened at 2024-03-14 14:15:50.859652
    [8870] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [8870] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [8870] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [8870] Log closed at 2024-03-14 14:15:50.860519

  4. #4
    Membre Expert
    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    1 723
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 1 723
    Par défaut
    Tu as relancé ton serveur Apache ?

    ça peut être ton parefeu qui bloque le port aussi

  5. #5
    Membre averti
    Homme Profil pro
    retraité
    Inscrit en
    Mars 2022
    Messages
    47
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : retraité

    Informations forums :
    Inscription : Mars 2022
    Messages : 47
    Par défaut
    Oui, j'ai relancé apache.
    Lorsque je lance le débogueur sur VSCode, j'obtiens:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    erard@gerard-ThinkCentre-M700:~$ lsof -i :9003 | grep LISTEN
    code    23040 gerard   26u  IPv6 190142      0t0  TCP *:9003 (LISTEN)
    gerard@gerard-ThinkCentre-M700:~$
    Donc, il n'y a pas de blocage.
    Ça marchait auparavant depuis /var/www/html.
    Je n'avais configuré que le fichier /etc/php/8.1/apache2/conf.d/20-xdebug.ini dans lequel j'avais mis:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    zend_extion=xdebug.so
    xdebug.mode=develop, debug
    xdebug.start_with_request=yes
    J'ai installé xdebug suivant cette mhétode: https://php.tutorials24x7.com/blog/h...eans-on-ubuntu
    Ce n'est donc pas le paquet php8.1-xdebug d'ubuntu que j' ai installé, mais un xdebug compilé (mais pourquoi xdebug à partir de phpinfo propose-t-il une compilation?)
    J'ai installé par mégarde php8.1-xdebug. Je me suis retrouvé avec deux Xdebug.
    J'ai désinstallé le paquet et j' ai nettoyé un ou deux fichiers. Je crois que cela a foutu le bordel.

    C'est pas possible de désinstaller le xdebug compilé?

  6. #6
    Membre averti
    Homme Profil pro
    retraité
    Inscrit en
    Mars 2022
    Messages
    47
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : retraité

    Informations forums :
    Inscription : Mars 2022
    Messages : 47
    Par défaut
    Bon. À priori, j'avais désinstallé (ou pas installé Xdebug par la compilation.
    J'ai revu la configuration des fichiers. Pour n'avoir plus qu'un seul fichier de configuration,
    - j'ai enlevé les configurations de /etc/php/8.1/apache2/php.ini et /etc/php/8.1/cli/php.ini:
    - j'ai effacé les dossiers /etc/php/8.1/cli/conf.d/20-xdebug.ini et /etc/php/8.1/apache2/conf.d/20-xdebug.ini
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    sudo rm /etc/php/8.1/cli/conf.d/20-xdebug.ini
    sudo rm /etc/php/8.1/apache2/conf.d/20-xdebug.ini
    - j'ai créé deux liens symbolique vers /etc/php/8.1/mods-available/xdebug.ini
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    sudo ln -s /etc/php/8.1/mods-available/xdebug.ini /etc/php/8.1/cli/conf.d/20-xdebug.ini
    sudo ln -s /etc/php/8.1/mods-available/xdebug.ini /etc/php/8.1/apache2/conf.d/20-xdebug.ini
    - Puis j'ai mis les configurations dans le dossier commun (/etc/php/8.1/mods-available/xdebug.ini)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    zend_extension=xdebug.so
    xdebug.mode = develop, debug
    xdebug.start_with_request = yes
    xdebug.log = /tmp/xdebug.log
    xdebug.client_host = localhost
    xdebug.client_port = 9003
    XdebugInfos est bien configuré.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    Development Helpers	✔ enabled	🖹
    Coverage	✘ disabled	🖹
    GC Stats	✘ disabled	🖹
    Profiler	✘ disabled	🖹
    Step Debugger	✔ enabled	🖹
    Tracing	✘ disabled	🖹
    Optional Features
    Compressed File Support 	no
    Clock Source 	clock_gettime
    Diagnostic Log
    No messages
    Step Debugging	Docs
    Debugger	Active	🖹
    Connected Client	localhost:9004	 
    DBGp Settings
    Max Children	32	 
    Max Data	1024	 
    Max Depth	1	 
    Show Hidden Properties	No	 
    Extended Properties	No	 
    Notifications	No	 
    Resolved Breakpoints	No	 
    Breakpoint Details	No	 
    PHP
    Build Configuration
    Version (Run Time) 	8.1.2-1ubuntu2.14
    Version (Compile Time) 	8.1.1
    Debug Build 	no
    Thread Safety 	disabled
    Settings
    Configuration File (php.ini) Path 	/etc/php/8.1/cli
    Loaded Configuration File 	/etc/php/8.1/apache2/php.ini
    Scan this dir for additional .ini files 	/etc/php/8.1/apache2/conf.d
    Additional .ini files parsed 	/etc/php/8.1/apache2/conf.d/10-mysqlnd.ini, /etc/php/8.1/apache2/conf.d/10-opcache.ini, /etc/php/8.1/apache2/conf.d/10-pdo.ini, /etc/php/8.1/apache2/conf.d/15-xml.ini, /etc/php/8.1/apache2/conf.d/20-apcu.ini, /etc/php/8.1/apache2/conf.d/20-calendar.ini, /etc/php/8.1/apache2/conf.d/20-ctype.ini, /etc/php/8.1/apache2/conf.d/20-curl.ini, /etc/php/8.1/apache2/conf.d/20-dom.ini, /etc/php/8.1/apache2/conf.d/20-exif.ini, /etc/php/8.1/apache2/conf.d/20-ffi.ini, /etc/php/8.1/apache2/conf.d/20-fileinfo.ini, /etc/php/8.1/apache2/conf.d/20-ftp.ini, /etc/php/8.1/apache2/conf.d/20-gd.ini, /etc/php/8.1/apache2/conf.d/20-gettext.ini, /etc/php/8.1/apache2/conf.d/20-iconv.ini, /etc/php/8.1/apache2/conf.d/20-intl.ini, /etc/php/8.1/apache2/conf.d/20-mbstring.ini, /etc/php/8.1/apache2/conf.d/20-mysqli.ini, /etc/php/8.1/apache2/conf.d/20-pdo_mysql.ini, /etc/php/8.1/apache2/conf.d/20-pdo_sqlite.ini, /etc/php/8.1/apache2/conf.d/20-phar.ini, /etc/php/8.1/apache2/conf.d/20-posix.ini, /etc/php/8.1/apache2/conf.d/20-readline.ini, /etc/php/8.1/apache2/conf.d/20-shmop.ini, /etc/php/8.1/apache2/conf.d/20-simplexml.ini, /etc/php/8.1/apache2/conf.d/20-sockets.ini, /etc/php/8.1/apache2/conf.d/20-sqlite3.ini, /etc/php/8.1/apache2/conf.d/20-sysvmsg.ini, /etc/php/8.1/apache2/conf.d/20-sysvsem.ini, /etc/php/8.1/apache2/conf.d/20-sysvshm.ini, /etc/php/8.1/apache2/conf.d/20-tokenizer.ini, /etc/php/8.1/apache2/conf.d/20-xdebug.ini, /etc/php/8.1/apache2/conf.d/20-xmlreader.ini, /etc/php/8.1/apache2/conf.d/20-xmlwriter.ini, /etc/php/8.1/apache2/conf.d/20-xsl.ini, /etc/php/8.1/apache2/conf.d/20-zip.ini
    Directive	Local Value	Master Value	Docs
    xdebug.mode	develop, debug	develop, debug	🖹
    xdebug.start_with_request	yes	yes	🖹
    xdebug.start_upon_error	default	default	🖹
    xdebug.output_dir	/tmp	/tmp	🖹
    xdebug.use_compression	0	0	🖹
    xdebug.trigger_value	no value	no value	🖹
    xdebug.file_link_format	no value	no value	🖹
    xdebug.filename_format	no value	no value	🖹
    xdebug.log	/tmp/xdebug.log	/tmp/xdebug.log	🖹
    xdebug.log_level	7	7	🖹
    xdebug.var_display_max_children	128	128	🖹
    xdebug.var_display_max_data	512	512	🖹
    xdebug.var_display_max_depth	3	3	🖹
    xdebug.max_nesting_level	256	256	🖹
    xdebug.cli_color	0	0	🖹
    xdebug.force_display_errors	Off	Off	🖹
    xdebug.force_error_reporting	0	0	🖹
    xdebug.halt_level	0	0	🖹
    xdebug.max_stack_frames	-1	-1	🖹
    xdebug.show_error_trace	Off	Off	🖹
    xdebug.show_exception_trace	Off	Off	🖹
    xdebug.show_local_vars	Off	Off	🖹
    xdebug.dump.COOKIE	no value	no value	🖹
    xdebug.dump.ENV	no value	no value	🖹
    xdebug.dump.FILES	no value	no value	🖹
    xdebug.dump.GET	no value	no value	🖹
    xdebug.dump.POST	no value	no value	🖹
    xdebug.dump.REQUEST	no value	no value	🖹
    xdebug.dump.SERVER	no value	no value	🖹
    xdebug.dump.SESSION	no value	no value	🖹
    xdebug.dump_globals	On	On	🖹
    xdebug.dump_once	On	On	🖹
    xdebug.dump_undefined	Off	Off	🖹
    xdebug.profiler_output_name	cachegrind.out.%p	cachegrind.out.%p	🖹
    xdebug.profiler_append	Off	Off	🖹
    xdebug.cloud_id	no value	no value	🖹
    xdebug.client_host	localhost	localhost	🖹
    xdebug.client_port	9004	9004	🖹
    xdebug.discover_client_host	Off	Off	🖹
    xdebug.client_discovery_header	no value	no value	🖹
    xdebug.idekey	no value	no value	🖹
    xdebug.connect_timeout_ms	200	200	🖹
    xdebug.scream	Off	Off	🖹
    xdebug.gc_stats_output_name	gcstats.%p	gcstats.%p	🖹
    xdebug.trace_output_name	trace.%c	trace.%c	🖹
    xdebug.trace_format	0	0	🖹
    xdebug.trace_options	0	0	🖹
    xdebug.collect_assignments	Off	Off	🖹
    xdebug.collect_return	Off	Off	🖹
    xdebug.log donne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    6655] Log opened at 2024-03-14 19:22:16.076252
    [6655] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [6655] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [6655] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [6655] Log closed at 2024-03-14 19:22:16.077318
     
    [6656] Log opened at 2024-03-14 19:22:16.091521
    [6656] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [6656] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [6656] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [6656] Log closed at 2024-03-14 19:22:16.092372
     
    [9062] Log opened at 2024-03-14 20:11:25.987130
    [9062] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [9062] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [9062] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [9062] Log closed at 2024-03-14 20:11:25.988229
     
    [9063] Log opened at 2024-03-14 20:11:25.994390
    [9063] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [9063] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [9063] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [9063] Log closed at 2024-03-14 20:11:25.995178
     
    [9284] Log opened at 2024-03-14 20:12:04.461387
    [9284] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [9284] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [9284] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [9284] Log closed at 2024-03-14 20:12:04.462179
     
    [9285] Log opened at 2024-03-14 20:12:04.509988
    [9285] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [9285] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [9285] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [9285] Log closed at 2024-03-14 20:12:04.510698
     
    [10347] Log opened at 2024-03-14 20:23:01.354840
    [10347] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [10347] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [10347] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [10347] Log closed at 2024-03-14 20:23:01.356652
     
    [10348] Log opened at 2024-03-14 20:23:01.371857
    [10348] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
    [10348] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
    [10348] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    [10348] Log closed at 2024-03-14 20:23:01.372540
     
    [10765] Log opened at 2024-03-14 20:24:36.057642
    [10765] [Step Debug] INFO: Connecting to configured address/port: localhost:9004.
    [10765] [Step Debug] WARN: Creating socket for 'localhost:9004', poll success, but error: Operation now in progress (29).
    [10765] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9004 (through xdebug.client_host/xdebug.client_port) :-(
    [10765] Log closed at 2024-03-14 20:24:36.058404
     
    [10766] Log opened at 2024-03-14 20:24:36.075528
    [10766] [Step Debug] INFO: Connecting to configured address/port: localhost:9004.
    [10766] [Step Debug] WARN: Creating socket for 'localhost:9004', poll success, but error: Operation now in progress (29).
    [10766] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9004 (through xdebug.client_host/xdebug.client_port) :-(
    [10766] Log closed at 2024-03-14 20:24:36.076134
    " netstat -an | grep 9003" donne quand le deboggueur est actif:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    gerard@gerard-ThinkCentre-M700:~$ netstat -an | grep 9003
    tcp6       0      0 :::9003                 :::*                    LISTEN

  7. #7
    Membre averti
    Homme Profil pro
    retraité
    Inscrit en
    Mars 2022
    Messages
    47
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : retraité

    Informations forums :
    Inscription : Mars 2022
    Messages : 47
    Par défaut
    Xdedug avec marche de deux manières:

    1 - avec une session CLI (sans serveur et sans fichier de configuration launch.json):
    - Ouvrir votre fichier avec VSCode
    - Mettre des points d'arrêt
    - Lancer l'application avec l'option "Start Debugging". Le de débogueur devient opérationnel

    2 - avec un serveur local
    - Ouvir votre fichier avec VSCode
    - Créer un fichier launch.json file (section "run and debbug" dans la partie gauche de l'interface)
    - Créer un(des) breakpoint(s)
    - Délmarrer l'application avec "Start Debugging" option.
    - Lancer l'application avec un navigateur internet (localhost/my-progam.php). Le débogueur se lance sur VSCode.

    PS: vous pouvez retrouver un résumé de ce que j'ai dit dans la partie 2 de la page Visual Studio Code d'ubuntu-fr (partie 2.3): https://doc.ubuntu-fr.org/visual_stu...dium_ou_vscode

  8. #8
    Membre averti
    Homme Profil pro
    retraité
    Inscrit en
    Mars 2022
    Messages
    47
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : retraité

    Informations forums :
    Inscription : Mars 2022
    Messages : 47
    Par défaut
    3 - avec le serveur web interne PHP: - Lancer le serveur PHP sur le port 8082 (par exemple) en local:
    - Créer un fichier launch.json file si besoin (section "run and debbug" dans la partie gauche de l'interface)
    - Démarrer l'application avec l'option "Start Debugging".
    - Lancer une requête HTTP avec le logiciel POSTMAN (par exemple) ou depuis un navigateur internet pour une requête GET.
    - Le débogueur devrait démarrer aussitôt.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Compilation qui ne fonctionne plus après copie
    Par felix104116 dans le forum C++
    Réponses: 3
    Dernier message: 16/12/2017, 01h43
  2. Réponses: 3
    Dernier message: 10/09/2012, 19h42
  3. Réponses: 2
    Dernier message: 22/06/2005, 13h07
  4. mes requetes sous access ne fonctionnent plus
    Par trialrofr dans le forum ASP
    Réponses: 12
    Dernier message: 04/12/2004, 21h52
  5. [JSP][Tomcat]Changement de context -> JSP fonctionne plus
    Par mathieu dans le forum Servlets/JSP
    Réponses: 7
    Dernier message: 01/03/2004, 08h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo