• 1. git clone https://github.com/WordPress/wordpress-develop
    c:\wordpress-develop directory is created.
    2. installed npm, docker, and visual studio code ide
    3. In c:\wordpress-develop folder, I typed – npm run env:start
    Now docker desktop shows three containers; everything is working at this point.
    localhost url – localhost:8889
    How do I debug my localhost using the visual studio code editor?
    Do I just need to set up a breakpoint and then click start Debugging?
    Do I need to edit docker-compose.yml?
    HELP!!!
    Thank you

Viewing 1 replies (of 1 total)
  • Thread Starter nansengp

    (@nansengp)

    Oct 10, 2022 at 8:47 usa est
    My latest update:
    Now I can debug using VS code and I changed .env (see below).
    # Whether or not to enable Xdebug.
    # LOCAL_PHP_XDEBUG=false
    LOCAL_PHP_XDEBUG=true
    run npm run env:start
    NOW DOCKER 3 CONTAINS are running.
    mysql-1, php-1 and wordpress-develop-1.
    start my VSC editor and loaded files from c:\wordpress-develop\src.
    Select Start Debugging from Run menu (below is my stack trace)

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\wordpress-develop\src\wp-includes\class-wpdb.php:1978
    Stack trace:
    #0 C:\wordpress-develop\src\wp-includes\class-wpdb.php(769): wpdb->db_connect()
    #1 C:\wordpress-develop\src\wp-includes\load.php(562): wpdb->__construct('root', 'password', 'wordpress_devel...', 'mysql')
    #2 C:\wordpress-develop\src\wp-settings.php(124): require_wp_db()
    #3 C:\wordpress-develop\wp-config.php(113): require_once('C:\\wordpress-de...')
    #4 C:\wordpress-develop\src\wp-load.php(55): require_once('C:\\wordpress-de...')
    #5 C:\wordpress-develop\src\wp-login.php(12): require('C:\\wordpress-de...')
    #6 {main}
      thrown in C:\wordpress-develop\src\wp-includes\class-wpdb.php on line 1978

    ======================
    THANK YOU.
    nansengp

Viewing 1 replies (of 1 total)
  • The topic ‘debug set up with visual studio code ide’ is closed to new replies.