PhpStorm debug console says "this view is read only" - php

I have xdebug stop in one breakpoint and I want to test some code in console but I have a problem.
I can't write in console and when I tried to paste it says "this view is read only"

I had the same issue with log files. Disabling all log highlight plugins (i.e. Ideolog) fixed it. They weren't highlighting anything anyway except scrollbar in green color.
Hope this helps somebody.

Sometimes this can happen for the log file that is too large. PhpStorm disables the possibility of editing it and adds “this view is read only” message.

If I'm reading your screenshot and what you wish to do correctly ... then PhpStorm version you are using is too old.
The Interactive Debug Console was added in v10 while you are using v9.0.2.
https://blog.jetbrains.com/phpstorm/2015/09/get-an-advantages-of-interactive-console-during-debugging-in-phpstorm-9-5-eap/
Upgrade your PhpStorm to the latest version -- which is 2017.1.2 right now.

Related

How Can I see steps of running codes in phpstorm?

I have a problem in my PHP codes I cant find that. because dont display any warning or error and redirect to the main page of my website project and after many test couldnt find problem.
I want to see steps of running the code for example:
get values of $click and $usercode variables===> redirect to request_change.php and run mysql_query with value="select * from users where userid=65643"==> get $username ==> and else...
I can see some running steps by debugging but not exact that I Want and display many error about finding some directories in require_once function but while my webpages display and process information right by wamp.
Is any way to debugging same as that by Phpstorm or any other programs?
OR
How can I run My php code in phpstorm step-by-step and line-by-line??
Update:
I configured phpstorm for debugging but Just I can use debug and select one of page to debug.I checked all the settings steps that were done correctly But The step by step debug buttons is'nt active such as stepOver and step intro and else... In addition, after debugging the codes, the error : PHP Warning: include_once(): Failed opening '.\dref.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\srn\mrt\req_v.php on line 260
is displayed, while the same code works well in the wamp by Firefox
What should I do to solve this problem?
One of the most powerful and useful tools any developer could have is a debugger. I use xDebug myself. With it you can step through a program during execution and watch each method call, every variable value change, and every action the program does. With PHPStorm it is typically very easy to enable / use xDebug. This would be my recommendation for troubleshooting the issue you have.
References:
https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html
https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm
https://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide

Eclipse Neon php - "Exception cannot be resolved to a type"

Ok, so this worked earlier today...
My Eclipse has turned on me. Earlier today, everything was fine. We had some networking issues, so I shut Eclipse down, waited for the all clear, and restarted.
Suddenly, Eclipse decided that almost ALL my source files had errors in them. Looks like it is suddenly working within namespaces. I get dozens and dozens of " cannot be resolved to a type" error in the source code.
So, I prepended the "\" character onto class names in one of the offending files, and things got better, but still things like Exception and PDO give the error. Even though I have modified the line like so:
throw new \Exception("Error - $acnt is not an account in the $source database");
We have a very big system, and because of these errors, I have dozens of checked out files that are giving me a commit error when I try to check them in, which is going to slow things down a tad. Any ideas:
1) why this suddenly started happening?
2) how I can "fix" this behavior?
thanks...
And as quietly and quickly as it appeared, it disappeared. I opened a new file, and suddenly, all the little red Xes disappear. Grrr... Eclipse.
When I create a new project I see the same warning. If I touch .buildpath in the root directory of the project and restart eclipse, then the warning goes away.
Rightclick project (or use Project/Properties), then go PHP/Source Paths/Build Path
Included probably says (All), Excluded probably says (None). Edit Included, and add the wildcard * for the project.
Solved all errors and warnings for me.

Netbeans does not show error messages

Helo,
my Netbeans does not show error messages when some error occurred in code. It used to show red icon on the line where error (eg. syntax error) occurred. Now it shows icon only next to filename in file tab. I do not remember if I changed some IDE settings - there was no reason to disable error messages.
I expect red icon on the line number 85, like it is here
Maybe I am missing some option in netbeans preferences. I have tried to find it but with no result.
This doesn't apply to OP because they are using .php extensions, but it might help someone else...
For me the issue was because I'm developing with drupal and so most files don't end with php. To fix my issue:
Tools | Options | Miscellaneous | Files
Click New next to File Extension and choose 'text/x-php5' as the associated file type.
Restart IDE
I do not know if you have fixed the problem, but I had the same issue here.
I finally successed in fixing it.
In "Tools" > "Options" > "Editor tab", then in "Hints" tab, I disabled the "Braces" section for PHP language.
I don't know why, but now syntax errors are shown in the left side bar as your screenshot shows.
I hope this can help you!
EDIT: I'm using Netbeans v8.1 for Linux.

Xdebug on ubuntu and phpStorm doesn't show any erros

So I am new in ubuntu and I installed LAMP and get it to work with phpsotrm properly. The only problem i have is that when i have errors in my code it doesn't show me any errors, just a blank page.
Now with phpstorm I manged to connect with xDebug and when I checked phpinfo() I found:
http://imgur.com/zZnAi7d
Here is the phpstorm connection:
http://imgur.com/ckrkeHp
I changed proper php.ini file and I added following line at the end of the file:
[XDebug]
;zend_extension="/usr/lib/php5/20121212/xdebug.so"
;xdebug.remote_enable=1
;xdebug.remote_port="9000"
;xdebug.profiler_enable=1
;xdebug.profiler_output_dir="<AMP home\tmp>"
Still noting is shown, not even in the console or in the page source. Is there any fix for this issue? I tried to search the internet but couldn't find anything.
Just follow those intructions:
Let PHP show all errors
It seems that you've got disabled showing any errors.
I am such a dummy it actually works just the certain errors that i was trying to simulated didn't really effect xDebug.
I am so sorry for wasting your time.

Why am I not seeing any firephp output?

I am trying to get firephp to work. It was working as of last week and I don't know when
exactly it stopped working or what I changed.
I am now trying to do a simple firephp hello world.
<?php
require_once('FirePHPCore/FirePHP.class.php');
ob_start();
$firephp = FirePHP::getInstance(true);
$firephp->log('Hello', 'World');
require_once('FirePHPCore/fb.php');
$var='test';
fb($var);
FB::send($var);
ob_end_flush();
?>
There is no result in the firebug console window and no error messages I can find.
FireFox 5.0
FireBug 1.8.0
PHP 5.3.1
Firebug console and net panels are enabled. FirePHP is enabled.
In the net panel under the get request, I do not see any X-wf- headers.
Firebug has to have the Net panel enabled.
EDIT: Just press f12, click on the Net and if it says enable, click on enable :)
This one is ridiculous but I just wasted 30 mins, make sure you have your output set on 'All' and not 'Errors' or something like that in the firePHP console.
The FirePHP Extension now works again with Firebug 1.8: http://www.firephp.org/HQ/FinalRelease.htm
Explanation of what happened: http://www.christophdorn.com/Blog/2011/08/03/firephp-and-firebug-1-8/
It seems there is a knowned issue using the latest Firebug version 1.8 and Firefox 5:
http://groups.google.com/group/firephp-dev/browse_thread/thread/aa8ca7877f4f2d82?pli=1
Downgrading to version 1.7.3 solved the problem for me.
http://getfirebug.com/releases/firebug/1.7/firebug-1.7.3.xpi
You need to call ob_end_flush() for any output to get sent to the browser.
As I was led here by a google result motivated by the same problem I would like to add some perspective for posterity.
While testing in local environment on any of the new Windows OSs (Windwos 7 and above) you should check if your file is blocked .
That's right: in my case require_once didnt throw any fatal errors which it should if it couldnt find the file - so sth. had to be wrong with the file.
On Linux you would check permissions, on windows you need to check the file properties and see if the file is being blocked.
If it is and you have admin privileges, you can unblock it then and there.

Categories