Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7795445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:04:17+00:00 2026-06-01T23:04:17+00:00

First things first, have some xdebug info: Xdebug installed: 2.2.0rc1 Server API: Apache 2.4

  • 0

First things first, have some xdebug info:

Xdebug installed: 2.2.0rc1
Server API: Apache 2.4 Handler Apache Lounge
Windows: yes - Compiler: MS VC9 - Architecture: x86
Zend Server: no
PHP Version: 5.4.0
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\Windows
Configuration File: C:\Uniserver\UniServer\usr\local\php\php.ini
Extensions directory: C:\Uniserver\UniServer\usr\local\php\extensions

You're already running the latest Xdebug version

Everything looks fine. This is what my php.ini looks like:

[Xdebug]
zend_extension=C:\Uniserver\UniServer\usr\local\php\extensions\php_xdebug-2.2.0RC1-5.4-vc9.dll
xdebug.remote_host=localhost
xdebug.remote_port=9123
xdebug.idekey=PHPSTORM
xdebug.remote_mode=req
xdebug.remote_handler=dbgp
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.remote_autostart=0
xdebug.remote_log="C:\Uniserver\UniServer\usr\local\php\extensions\tmp\log.log"
xdebug.overload_var_dump=1
xdebug.trace_format=0
xdebug.show_exception_trace=0
xdebug.default_enable=0

Now, I’m going to try to debug with PhpStorm. First I go to Settings->PHP->Servers and add this:

Name: localhost
Host: localhost
Port: 8080
Debugger: Xdebug

(Yes, my website is running on port 8080, otherwise I get conflicts with other software I’m using.) Then I create a new Run/Debug configuration:

PHP Remote Debug
Name: local
Servers: localhost
Ide key(session id): PHPSTORM

I also create a start/stop debug bookmark with this tool: http://www.jetbrains.com/phpstorm/marklets/index.html

Ok, everything looks ready, so I hit the Debug button in PhpStorm.

The homepage of my project is located at http://localhost:8080/Project/page/Home.php, so I navigate there. The page loads. I hit the start-button in my bookmarks bar, reload and the page stays blank…

When I add a breakpoint on the home.php file in my project and reload again, the breakpoint gets hit! I can step over, step into,… All the values are displayed.. This works without any issue. But when I went over all the breakpoints, or hit Resume Program, and return the the browser the page is completely blank. The HTML code looks like this:

<html><head><style type="text/css"></style></head><body></body></html>

What is going on? Why is the page I’m debugging not being rendered? Stepping over the code works, all the php and html is being executed, yet in the end nothing is shown in my browser. I plan to use the Xdebugger on a function that is located in a file /Project/class/Account.php, but I can’t get there without pressing a button on my Homepage.

Why not use an Xdebug proxy you say? Might that solve anything? Well, whenever I try to set one up I get this error:

Xdebug proxy: Cannot connect to xdebug proxy on ‘localhost:9123’

Even though my Xdebug proxy configuration is correct:

IDE key: PHPSTORM
Host: localhost
Port: 9123

Can anyone please tell me what’s going on? I really need this debugger because there’s a certain function that won’t work correctly for some reason, and it’s driving me insane. I need to check what variables are being passed and what’s happening to them.

EDIT

Extra information: When I’m done stepping over all the code my debugger says:

Waiting for incoming connection with ide key 'PHPSTORM'

Might this be the reason my page is not loading?

EDIT EDIT

Ok, instead of hitting the debug button, I can also just start listening to PHP Debug Connections. This works as well! My breakpoints are hit, I can step into… But the same problem persists: My webpage stays blank and my debugger says ‘Disconnected’ at the end. The problem persists in any browser.

EDIT EDIT EDIT

I’ve found out something else that’s very weird while debugging… I can step into my code just fine until I hit the function that gets my database instance. The Database class looks like this:

class Database
{
    private static $instance = null;
    private static $conn;

    private function __construct()
    {
        try {
            self::$conn = new mysqli('localhost', 'root', 'root', 'database', '3308');
        } catch (Exception $ex) {
            $errorpager = new CustomPageGenerator();
            $errorpager->generateErrorPage("Connection to database failed. Please try again later.");
        }
    }

    public static function getInstance()
    {
        try {
            if (self::$instance == null) {
                self::$instance = new Database();
            }
            return self::$instance;
        } catch (Exception $ex) {
            $errorpager = new CustomPageGenerator();
            $errorpager->generateErrorPage("Connection to database failed. Please try again later.");
            return false;
        }
    }

    public function query($sql)
    {
        try {
            return self::$conn->query($sql);
        } catch (Exception $ex) {
            $errorpager = new CustomPageGenerator();
            $errorpager->generateErrorPage("Connection to database failed. Please try again later.");
            return false;
        }
    }
}

I get this feeling my database class might have something to do with this issue… Every time I hit the getInstance() function, debugging halts abruptely and I get the net::ERR_CONNECTION_RESET error in Google Chrome. Could this be the issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:04:19+00:00Added an answer on June 1, 2026 at 11:04 pm

    From what you describe, xdebug remote debugging works.

    Why that HTML is returned to the browser (and not what you expect) is hard to say. Have you tried using a stable version of xdebug?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having nice first days using Yii but have some troubles with getting things
I have some jQuery/JS below. The first thing to run is the alert box
First of all i have to clear few things 1.This is not spam group
I have an app with a UITextField, amongst other things. When the user first
I've installed PowerShell recently and one of the first things I started looking for
Does anyone have some recommendations on how I can find databases for random things
I have some code that retrieves a scripted svg image from a server via
I am about to build my first iPhone app. I have some general questions
I have some things I need to use custom SQL for. Just to start,
I have some css for adjusting things in my table. Here it is: .editor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.