How to configure xdebug with WAMP - wamp

I am using wamp 2.0 and trying to install XDebug extension for php. I have followed all steps written here http://wiki.netbeans.org/HowToConfigureXDebug#How_to_configure_xdebug_with_WAMP
but still its not working.
Any suggestion how to fix this?

please follow the instructions at http://xdebug.org/find-binary.php
cheers,
Derick

If you're just debugging a local session using wampserver 3.0.6 and php 7.0.10 using xdebug, there's almost no need to edit your php.ini manually (more on that later).
You may activate xdebug.remote_enable from the tray icon menu. Having done so should yield something like the following output in php.ini (it's at the absolute end of the file):
; XDEBUG Extension
[xdebug]
zend_extension ="C:/wamp64/bin/php/php7.0.10/zend_ext/php_xdebug-2.4.1-7.0-vc14-x86_64.dll"
xdebug.remote_enable = On
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp64/tmp"
xdebug.show_local_vars=0
From there, the only thing you need to specifically add yourself (at least when using the php-debug extension in VS Code) to php.ini is:
xdebug.remote_autostart = 1
Don't forget to restart wampserver after that. If you need to connect remotely to another host, you would probably need som variation of (replace 127.0.0.1 with remote IP):
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
But that is pretty much outside the scope of my answer since that opens up a whole new can of worms IMHO

Follow instructions on http://xdebug.org/find-binary.php as Derick mentioned, but when configuring xdebug on Wampserver 3.0.0 I also had to add the following code to my php.ini.
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.profiler_output_dir = C:\wamp\tmp

for php 7 the configuration variables were renamed my final working configuration ended up like this:
xdebug.mode = develop,debug,profile
xdebug.start_with_request=yes
xdebug.output_dir =c:/wamp64/tmp
xdebug.show_local_vars = 1
xdebug.log=c:/wamp64/logs/xdebug.log
xdebug.log_level = 10
xdebug.client_host=localhost
xdebug.client_port=9000

Related

How to remove Epiphany from my NixOS while keeping the rest of GNOME?

I have GNOME installed in my NixOS version 21.05. Epiphany is a GNOME application for web browsing that comes as a default application. I would like to remove it.
How can I remove Epiphany without removing other parts of GNOME?
According to the NixOS wiki, the following snippet can be added to remove GNOME applications in general:
environment.gnome.excludePackages = [ pkgs.gnome.cheese pkgs.gnome-photos pkgs.gnome.gnome-music pkgs.gnome.gnome-terminal pkgs.gnome.gedit pkgs.epiphany pkgs.evince pkgs.gnome.gnome-characters pkgs.gnome.totem pkgs.gnome.tali pkgs.gnome.iagno pkgs.gnome.hitori pkgs.gnome.atomix pkgs.gnome-tour ];
In order to remove only Epiphany, the following line must be added to the configuration.nix file:
environment.gnome.excludePackages = [ pkgs.epiphany ];
It worked as expected for me.

Redmine: Change Project Identifier?

Is there a way to change the identifier of a project, without directly editing the database?
There is no obvious option to change it in the WebUI.
Apparently this has been an "issue" for a while:
https://www.redmine.org/boards/2/topics/2918?r=48986
Project identifiers are clearly not meant to be modified. It appears that the expectation is that one should delete a project and re-create it with the new identifier. Since this is unacceptable to me, I found a way around it.
The web interface does not allow for changing the identifier and there are a few roadblocks in the Project class itself that prevents one from just opening a console and running something like this (which, as a Rails developer, I would expect to be able to do):
p = Project.find_by(identifier: 'old-identifier')
p.identifier = 'new-identifier'
p.save
However, I have found that one can do this from a production console:
p = Project.where(identifier: 'old-identifier').first
p.instance_eval { self['identifier'] = 'new-identifier' }
p.save
Note: To access a "production console"...
cd into [R]edmine install directory, then run RAILS_ENV=production rails console
(Thanks, Dave)

Can I use applicationDirPath() to access resources at a higher directory level?

In the application that I am developing (using C++ and Qt), I am using QApplication::applicationDirPath() to access some resources, with respect of the application's path.
As an example, since I want to open a HTML manual from the application, I act this way:
void MainWindow::on_actionHelp_triggered()
{
QString link = QApplication::applicationDirPath() + "/Guide/guide.html";
bool r = QDesktopServices::openUrl(QUrl::fromLocalFile(link));
}
This snippet works if the project's structure presents the path "ProjectName/bin/Release/Guide/guide.html" (since the .exe file is in "ProjectName/bin/Release/AppName.exe").
But what can I do to refer to a higher-directory-level resource? As an example, I wish my HTML file to be in "ProjectName/data/Guide/guide.html". But this way, it seems not possible to compose the path in the way I'm acting.
EDIT: After #olive's comment, I wish to clarify a thing:
"Why am I not using '../'?"
Because it won't work from Visual Studio, where I am massively launch the application to test it. From VS, in fact, I shall use "../data/Guide/guide.html", when "from the outside", I'd have to do "../../data/Guide/guide.html".
That's why (I think) QApplication::applicationDirPath() exists. However, I am not an expert, so don't blame me and correct any eventual mistake of mine, please!
Just use ... QApplication::applicationDirPath() + "/../../data/Guide/guide.html" is perfectly valid path!
Of course there is another problem. When the application is installed, the relative path will probably be different again. You either need to configure the paths in visual studio so that the relative path works both during development and after deployment, or you need to detect the layout.

TYPO3 4.5 extbase test backend module

I search for a way to test my extbase-extension. I work with two different templatepaths for front- and backend.
module.myext{
view {
templateRootPath = myext/Resources/Private/Backend/Templates/
partialRootPath = myext/Resources/Private/Backend/Partials/
layoutRootPath = myext/Resources/Private/Backend/Layouts/
}
}
The backendmodule works without any problem, but my test will not get the different templatepath. If i write the view.templateRootPath to config.tx_extbase in the ext_typoscript_setup.txt it works, but in this case all my frontendtests do not work any more. The simplest way to resolve this issue is to merge the templatepaths and work with only one, but there must be a way around this solution.
Does somebody has an idea?
Did you statically include the extension setup in your root page?
Then the backend module should work as long as you include it in the web tools and select the root page in the page-tree...
If you include your module in the user tools, this is a known bug. See here:
http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2011-December/011174.html
You could put this code in your *ext_localconf.php*:
if (TYPO3_MODE === 'BE') {
t3lib_extMgm::addTypoScript($_EXTKEY, 'constants', $tsIncludeConstants);
t3lib_extMgm::addTypoScript($_EXTKEY, 'setup', $tsIncludeSetup);
}
where $tsIncludeXXis your TS code to include the configuration files of your extension:
$tsIncludeConstants = "<INCLUDE_TYPOSCRIPT: source=FILE:EXT:$_EXTKEY/Configuration/TypoScript/constants.txt>";
$tsIncludeSetup = "<INCLUDE_TYPOSCRIPT: source=FILE:EXT:$_EXTKEY/Configuration/TypoScript/setup.txt>";
This is kind of brute force, but it works...

Getting an incorrect permissions screen in the webview Blackberry 10 Cascades Beta 3 SDK in Dev Alpha Simulator

I am trying to make dynamically generated html 5 graphs show up in a webview in Blackberry 10 Cascades. I have confirmed the html5 that I have generated, draws the correct graphs. My problem is that when I try to implement this in the Blackberry 10 Cascades Beta 3 SDK (using the Blackberry 10 Dev Alpha Simulator), the webview that is supposed to show the graph, just looks like this:
Here is the code that leads to this error:
//html_ already contains the html-5 code to make the graph at this point in the code
//This is the file path to a local file that is actually accessable in the emulator
//and not just from Windows
//
QFile *chartFile = new QFile("app/native/assets/data/chart.html");
if (chartFile->open(QIODevice::WriteOnly)) {
chartFile->write(html_.toUtf8());
chartFile->flush();
chartFile->close();
}
if (chartFile) delete chartFile;
if (graphView_) {
graphView_->setHtml("");
graphView_->setUrl(QUrl::fromLocalFile("app/native/assets/data/chart.html"));
}
I checked the permissions of that file, put they are all Allow (777 permissions for those who know Unix style permissions).
I added access_internet to the bar-descriptor.xml, eventhough my app was already able to access remote sites, just to see if that would fix it, but it did not.
I've been searching around trying to find a solution to this problem, but I have not.
If anyone could help me out with this, it would be greatly appreciated.
-------------------------------------------------------
Update:
I changed the code to set the html directly, now I have this:
if (graphView_) {
graphView_->setHtml(html_, QUrl("app/native/assets/data/chart.html"));
}
But nothing shows. It seems I have the wrong relative path relative to my base url.
My base url is this: QUrl("app/native/assets/data/chart.html")
My relative paths all begin with: ./Highcharts/js/...
My relative paths are located under: app/native/assets/data/Highcharts/js
It seems to me that I this should work, but when I do this, I just a blank screen, as if it can not find my relative paths. So I don't know what's going on here either.
I found a solution that works. I'm using the first approach, not the updated approach, but instead of
graphView_->setUrl(QUrl("app/native/assets/data/chart.html"));
I'm using:
graphView_->setUrl(QUrl("local:///assets/data/chart.html"));
And I have left the rest of the code the same, and it works.