Using Xdebug with Netbeans or Komodo fails when connecting to Mysql - mysql

I am trying to get either NetBeans or Komodo IDE to remotely debug PHP. I have a remote website installed on the development machine which is a Mac running Mountain Lion. Xdebug is installed. The website on the local machine runs normally in a browser.
However, for both NetBeans and Komodo IDE, when single stepping through the code, the attempt to execute mysqli_connect fails. In NetBeans there is the following error message:
Socket Exception occured If you have any Watches, try to remove them and restart debugger. If removing Watches does not help or you
don't have any Watches, please file an issue and provide the exact
steps to reproduce your problem. Please attach the IDE log. Attaching
your project would also be very helpful.
I have seen other people reporting this error message, but no help has been provided.
In Komodo IDE, the failure occurs at the same location, but there is no error information provided at all.
The funny thing in NetBeans is that after some single stepping through the first page of the site, if I then run the code from that point, it executes without failure and the web page is displayed in the browser! This means that the problem only occurs while single stepping.
I have seen something somewhere about a bug in NetBeans. But it seems pretty blatant that NetBeans should not be able to single step through code that tries to connect to mysql. Rather I am thinking it would be some configuration issue on my system.
Komodo IDE has the same failure whether single stepping or running any other way. It just does not get past that point.
However, please keep in mind that just running the site in a browser works fine. So what is missing that prevents the Xdebug single stepping from connecting to mysql?
** Additional information **
I have found two instances of xdebug.so on my system.
-rwxr-xr-x 1 root admin 274508 Oct 6 2011 /opt/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
-rwxr-xr-x 1 root wheel 202672 Sep 20 20:01 /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
Also, there is an /opt/local/var/db/php5/xdebug.ini which references the xdebug.so in the /opt/local path. The xdebug.so in the /usr/lib path is the one that I thought was in use and which corresponds to instructions as to where it should be installed.
These are apparently two different versions of xdebug.so. Could that be related to my problem?

You need to make sure that you are running one version of Xdebug - and also make sure that this is the latest version (2.2.1 at the moment). If you can still reproduce this issue, please file a bug report at http://bugs.xdebug.org with a short sample script (that contains all the code + data!) and a remote debugging log for a debugging session using that script (see http://xdebug.org/docs/all_settings#remote_log on how to make such a log).

Related

Why do I get the error: "cannot communicate with the debug host process" when attempting to execute an SSIS package?

I create a new package in SSIS and when I try to run the package, SSIS returns the following error (displayed in a Visual Studio Error Dialog):
"Cannot communicate with the debug host process. The IDtsHost interface is not registered. (Microsoft.DataTransformationServices.VsIntegration"
Environment: VS 2019 with newest SSIS Extension Installed. The package appears to be created correctly and the build succeeds.
The error happens even if the package is trivial "hello world" type of package.
I found no solution to this after a fairly extensive search.
Thanks to EmersioN (https://stackoverflow.com/users/707267/emersion) for the solution. The problem in this case was the selected targeted version of SQL Server. My project was configured to target "SQL Server 2017", but was connected to a server running SQL Server 2012.
If you're seeing this error, this may be the reason.
Go to the properties page of the Integration Services project that contains the affected package. In the Property Pages dialog, navigate to Configuration Properties > General. Under the property group, Deployment Target Version, in the TargetServerVersion property drop-down, select the SQL Server version that matches the one you're connected to.
I just came across this as well in VS2019 SSDT. In my case it was a working SSIS package that after going to sleep for the night, the machine woke up and wouldn't execute the same scripts. These were my steps. Hope they help you or someone else who stumbles across this.
Open each connection within the script, Test Connection and Save
Clean the solution
Rebuild the solution
My context
Working through an SSIS tutorial using SQL Server 2019 Developer (v15.0.2080.9) and VS2019 Community (v16.11.9) to create packages using SSDT (SSIS Projects v3.15).
Packages in VS have executed without issue in the past. I then upgraded my machine from Windows 10 Pro to 11. Now, when running the same - possibly any - package I get the following error:
===================================
Failed to start project (Microsoft Visual Studio)
===================================
Cannot create a debug host for the package. (Microsoft.DataTransformationServices.VsIntegration)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.LaunchVsDebugger(Boolean isRemoteTest, IVsDebugger iVsDebugger, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
===================================
Cannot communicate with the debug host process. The IDtsHost interface is not registered. (Microsoft.DataTransformationServices.VsIntegration)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Project.DebugEngine.DebugEngine.LaunchDtsDebugHost(Process& process, Boolean run64bit)
at Microsoft.DataTransformationServices.Project.DebugEngine.DtsProgramNode.CreateRuntimePackageInternal(IDtsHost& host, Process& process, Package& dtsPackage)
...and the package does not execute.
What was tried
I tried/checked all 3 answers posted here.
Error persists.
This VS Dev Community's post recommended upgrading the VS extension, SSIS Projects. Since I had the most recent version installed an upgrade was not applicable, so I chose the repair option from the installer.
Error persists.
I then ran a repair on the VS2019 install. This, in turn, required another repair on SSIS Projects. (I still had both installers on my machine which made this easy.)
Error persists.
This MSDN post recommended re-registering DtsDebugHost.exe, failing that, re-installing SQL Server.
I ran the DtsDebugHost.exe /regserver command.
Error persists.
My Solution
I then chose to repair my SQL Server installation instead of re-installing. This was accomplished via the SQL Server Installation Center > Maintenance > Repair option. In my case, I chose the default instance, MSSQLSERVER.
VS now runs without the error and successfully executes the package.
I couldn't say whether my solution was solely based on the repaired SQL Server instance or a combination of other things tried and my last action. So I offer the path I took in the case of the latter.
Aside: The other choices during the SQL Server repair on my system were (1) another server instance, SQLSERVER2019, and (2) "shared components". Selecting either of those may have resolved the issue as well, but I couldn't confirm that.
In Project Property, turn off Azure-Enabled as seen in the image below. Your package will execute afterwards.
I encountered this error after upgrading to Windows 11.
I referred to the post by #steveb and went straight to his solution of repairing SQL Server (SQL Server Installation Center > Maintenance > Repair), without doing any of the other steps he tried.
And that solution worked.
I'm posting this because #steveb said he was unsure if any of his previous steps had affected the ultimate solution, and in my experience they were not necessarily needed.

Build does not start on development PC

I wrote a program that reads customers from an ascii file and writes them into a mysql DB.
When I use the VS2013 debugger (with F5) in release mode everything works perfect. But when I start the exe-file from the release directory, no windows are visible. In the windows log file, I see nothing and in the task manager I see my app 3 times and cannot close them. The only thing that I can do is to restart my PC.
I have tried to create a Setup program with InstallShield, but I have the same problem with the setup.exe file as with my program, It does not start.
Can someone help me with this problem?

How to fix "Could not load file or assembly 'MySql.Data, Version=6.8.3.0"

I created a simple program in Visual Studio. I made an installer and I tried to install it on my computer (the one I used to create the program) and when I run it, it works fine. Now the problem is, when I installed it on a different pc (it doesn't have visual studio) and run the program, it shows this error.
I browsed on existing questions here in SO and all I found are same errors DURING PROGRAM CREATION. More like they are not yet finished with the program. My problem is how to fix this error WHEN RUNNING IT ON A DIFFERENT PC AFTER INSTALLATION. Could someone please help me? Thanks. :)
It seems that you don't export MySql.Data.dll in your project.
Have you check if that file is in the install folder in the computer in which it is not working?
In this case you have to set the Copy Local properties to True. See details here

Launching TaskHost.exe failed, trying to run Windows Phone 8 app?

My VS 2013 setup has been humming along fine for months now. Today I tried to update to Visual Studio 2013 Update 2 RC. Just like last time when I updated to Update 1, setup failed badly with a huge list of packages marked with the "Incorrect Hash Value" error. Unfortunately MS does not have an ISO yet for Update 2 so I can't take that route to complete the update like I did last time. Now I can't run apps on the Windows Phone emulator or on the phone (device) anymore.
I believe that the failed update caused my current deployment problems since the problem surfaced right afterwards. It could be due to some other NuGet package or Extension, but the update is the most likely cause due to the timing of events.
I did extensive reading on SO and tried all the noted solutions. None of them worked:
cleaned and rebuilt the test Windows Phone 8 project (multiple times)
restarted VS2013
rebooted
Exited VS 2013 and restarted it with the Emulator left open (for the Emulator test)
repaired the Windows Phone Emulator install
repaired the VS2013 install
Nothing works. After the IDE installs the app on to the emulator, I still an error dialog box saying:
"The application could not be launched for debugging. Ensure that the target device screen is unlocked and that the application is installed."
And in the VS2013 IDE status line I see the message: "Launching TaskHost.exe failed".
Does anyone know how to fix this? Note, I tried several WP8 projects that I know worked successfully before and none of them can deploy successfully anymore to either the Emulator or the Device.
I see this was asked a month ago, but I had this issue as well. If I left the Emulator running and tried launching it again, I would have TaskHost fail with a different error.
The following was what made it work for me.
Under the following:
Solution(Right-click) > Properties > Configuration Properties > Configuration
Ensure that your main project is set to 'Deploy.'
Have many reason to error.! So, If you doing with database such as SQLLite file or SQL compact file for your project WP, you should check it is used anywhere. Or choose Embed source copy in visual. That's my fail.And i fixed ok!
Did you try from the menus?
BUILD > Rebuild Solution
That worked for me just now.

MySQL5.6 stuck on the process " attempting to start service "

I got a community server version of MySQL5.6 for windows7 32 bit.
and also downloaded windows installer for the same windows version.
Everything was prepared correctly.
I saw on a blog giving me a step-by-step manual for installing MySQL 5.6 on winodws7 32bit.
I did the instruction accordingly and it always stops processing in the phrase of starting service. I completely don't know what the problem is.
I googled it for like three hours and got nothing relevant to this problem.
It never processes any further without any kind of alerts, no matter how much I wait.
Please help me out.
My OS
Windows7 Ultimate K 32bit, Service Pack1
TURN OFF WINDOWS FIREWALL COMPLETELY BEFORE INSTALLING
This was one of the only threads I could find on this issue and the current answers did not cut the mustard for me.
MySQL 5.6.21, both x86 and x64, did not want to get past "Starting Server" and would give me the "MySQL install taking longer than expected" message.
I tried all of the registry cleaner, folder deletions, etc to no avail.
I am running Windows 7 x64 and I finally decided to check the event viewer to find this:
0x80070422 turns out to be some unspecified firewall error and boom, it struck me like lightning.
I hope this post helps future visitors!
Have you installed other version of MySQL before? I have experienced this case ,but I installed MySQL5.5 and uninstalled it. I solved it by clearing regedit and deleting the folder of MySQL in the directory(C:\ProgramData.This directory is hidden by default in Windows.),then reinstalled it.
Follow this link http://tadeparti.com/pages/?page_id=808.
And do remember to delete everything under the C:\program files\mysql folder, including the odbc stuff if you have.