Xdebug and Webgrind couldn't get to work - apache

I installed xdebug and webgrind on windows xampp 1.7.7 using this link: link . On going to http:// localhost/webgrind gives something as below instead of showing profiled script.No dropdown menu or something to select.
Select a cachegrind file above
(looking in C:\xampp\htdocs\webgrind\tmp/ for files matching /^cachegrind.out..+..+$/)
But I have 2 files in tmp folder starting with cachegrind.out names.
My settings in (xampp/php/php.ini) are
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.2-5.3-vc9.dll"
xdebug.profiler_output_dir = "C:\xampp\htdocs\webgrind\tmp"
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_name = cachegrind.out.%t.%p
webgrind/config.php settings
static $storageDir = 'C:\xampp\htdocs\webgrind\tmp';
static $profilerDir = 'C:\xampp\htdocs\webgrind\tmp';
I tried with these too
static $storageDir = '';
static $profilerDir = '/tmp';
But no result. How can I get it to work?

I got this accidentally, playing with values in xampp/php/php.ini file.
Here is the thing change value of xdebug.profiler_append from 0 to 1.

i had the same pb that took a long day having xampp 1.7.7 in my windows 7 OS i found that the
php_xdebug-2.2.2-5.3-vc9.dll was bad even it was php_xdebug-2.2.2-5.3-vc9.exe in the first download after a look at php.ini i found the good default xdebug just here with extra lignes so i delete the semi-colonnes ;
**[XDebug] zend_extension = "C:\Programs\xampp\php\ext\php_xdebug.dll"
xdebug.auto_trace
; Type: boolean, Default value: 0
; When this setting is set to on, the tracing of function calls will be enabled just before the
; script is run. This makes it possible to trace code in the auto_prepend_file.
;xdebug.auto_trace = 0**
; xdebug.collect_includes
; Type: boolean, Default value: 1
yes there was the good php_xdebug.dll coming with xampp
so use it and dont look far :) maybe that will help you

it might be also the matter of relative addressing due to portable xampp.
you can change your Xdebug addresses like this.
before
[XDebug]
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
;xdebug.trace_output_dir = "\xampp\tmp"
after
[XDebug]
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "D:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
;xdebug.trace_output_dir = "\xampp\tmp"

Related

Requested module experienced an error while loading - Server - Data:11

Yeah So, I'm coding a Roblox game and this script gets an error every time, I even restarted roblox studio to try fixing it but it didn't work and I tried messing around with the code but I couldn't figure it out, can someone please help?
Script:
local PetModule = require(ServerModules.PetModule)
Module Code:
local module = {}
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Pet = ReplicatedStorage.Pet
function module.EquipPet(Player, PetName)
local PetModel = Pet:FindFirstChild(PetName)
if PetModel then
PetModel = PetModel:Clone()
PetModel.Parent = workspace.Pet:FindFirstChild((Player.Name))
if Player then
local Character = Player.Character
if Character then
if not Character.HumanoidRootPart:FindFirstChild("PetAttachments") then
local PetAttachments = Instance.new("Folder")
PetAttachments.Name = "PetAttachments"
PetAttachments.Parent = Character.HumanoidRootPart
local PetAttachments = Character.HumanoidRootPart:FindFirstChild("PetAttachments")
if PetAttachments then
local att0 = Instance.new("Attachment")
att0.Name = "Attachment1"
att0.Position = PetModel:FindFirstChild("AttachmentPosition").Value
att0.Parent =Character.HumanoidRootPart
local att1 = Instance.New("Attachment")
att1.Name = "Attachment2"
att1.Parent = PetModel.PrimaryPart
local AlignPosition = Instance.new("AlignPosition")
AlignPosition.Attachment0 = att0
AlignPosition.Attachment1 = att1
AlignPosition.RigidityEnabled = false
AlignPosition.MaxForce = PetModel.MaxForce.Value
AlignPosition.Responsiveness = PetModel.Responsiveness.Value
AlignPosition.Parent = PetModel.PrimaryPart
local AlignOrientation = Instance.new("AlignOrientation")
AlignOrientation.Attachment0 = att0
AlignOrientation.Attachment1 = att1
AlignOrientation.RigidityEnabled = false
AlignOrientation.MaxTorque = PetModel.MaxForce.Value
AlignOrientation.Responsiveness = PetModel.Responsiveness.Value
AlignOrientation.Parent = PetModel.PrimaryPart
game:GetService("RunService").Heartbeat:Connect(function()
att0.Position = PetModel.AttachmentPosition.Value
AlignPosition.MaxForce = PetModel.MaxForce.Value
AlignOrientation.MaxTorque = PetModel.MaxForce.Value
AlignPosition.Responsiveness = PetModel.Responsiveness
end)
end
end
end
end
end
function module.UnequipPet(Player)
end
function module.UnequipAllPet(Player)
end
return module
end
If anyone could help me fix this it would be great.
make sure to put "return module" at the end!
return module
is within the function. Try to put it free at the end of the code and...
I'm not sure, but I think it's because you're creating an event connection within module, I had this problem right now. I just stopped creating events within the Module and the problem stopped.
Try removing this from de Code.
game:GetService("RunService").Heartbeat:Connect(function()
att0.Position = PetModel.AttachmentPosition.Value
AlignPosition.MaxForce = PetModel.MaxForce.Value
AlignOrientation.MaxTorque = PetModel.MaxForce.Value
AlignPosition.Responsiveness = PetModel.Responsiveness
end)

Error on WPN-XM php7

the systm version is WPNXM-0.8.6-Standard-Setup-php56-w64 . After I intalling php7.0.10_nts and when I change php version appear an error
problem with php7.0.10
Where is a problem ???
If you go to your php 7 folder (C:\server\bin\php) you will find that there are 2 php.ini files:
php.ini-development
php.ini-production
If you copy one of them with the name php.ini. this should fix it.
Edited:
You may need to change paths too like:
extension_dir = "ext"y
error_log = C:\server\logs\php_error.log
include_path = ".;C:\server\bin\php\pear"
upload_tmp_dir = C:\server\temp
;sendmail_path = "C:\server\bin\sendmail\sendmail.exe -t -i"
session.save_path = C:\server\temp
curl.cainfo =C:\server\bin\openssl\ca-bundle.crt
[Xdebug]
; activate remote debugging
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9000
; profiler
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\server\logs"
xdebug.profiler_output_name = cachegrind.out.%t.%p
[Zend]
zend_extension=C:\server\bin\php\ext\php_opcache.dll
zend_extension=C:\server\bin\php\ext\php_xdebug.dll

Configure a DataSource in TomEE in system.properties instead of tomee.conf

I'm able to configure a DataSource Resource in TomEE by modifying the "conf/tomee.xml" file. However, it's sort of awkward to automate this modification, as I have to insert the DataSource definition before the "" line. I heard from a comment in a related SO posting from me that it's easier to append to the "system.properties" file.
So, I tried translating this:
<Resource id="sus2" type="DataSource">
JdbcDriver = oracle.jdbc.driver.OracleDriver
MaxActive = 10
MinIdle = 2
MaxIdle = 2
MaxWait = 10000
JdbcUrl = jdbc:oracle:thin:#${DB_HOST}:${DB_PORT}:${DB_SID}
UserName = ${DB_USER}
Password = ${DB_PASSWORD}
</Resource>
Which works, to the following:
db = new://Resource?type=DataSource
db.id = Resource/sus2
db.JdbcDriver = oracle.jdbc.driver.OracleDriver
db.MaxActive = 10
db.MinIdle = 2
db.MaxIdle = 2
db.MaxWait = 10000
db.JdbcUrl = jdbc:oracle:thin:#${DB_HOST}:${DB_PORT}:${DB_SID}
db.UserName = ${DB_USER}
db.Password = ${DB_PASSWORD}
which does not work. It fails, saying it couldn't find the "Resource/sus2" resource.
The configuration reference can be found at http://tomee.apache.org/ng/admin/configuration/resources.html
You have to understand that XML attributes becomes URI query parameters then I think it will work.
In other words:
db = new://Resource?type=DataSource
becomes
sus2 = new://Resource?type=DataSource
and your db.id doesn't do anything - I think it is logged.
In short: replace all your "db" by "sus2" and it will work

Zend Framework: Multidb fails to initialize

This used to work but after some modifications by the other programmers it just fails to work. I have this code on my Bootstrap:
protected function _initDatabase ()
{
$resource = $this->getPluginResource('multidb');
$resource->init();
Zend_Registry::set('gtap', $resource->getDb('gtap'));
Zend_Registry::set('phpbb', $resource->getDb('phpbb'));
}
Upon loading, this error shows up:
Fatal error: Call to a member function init() on a non-object in
/var/www/gamebowl3/application/Bootstrap.php on line 105
My php.ini has this entry on tis include_path:
.:/usr/share/php:/etc/apache2/libraries
and the i can see that multidb.php is located in:
/etc/apache2/librarties/Zend/Application/Resource
Can somebody tell me what causes the error? Thanks!
I just found out that the problem is in application.ini. Added a newly-introduced setting to the usual set of configs. Here it is:
;Gtap Database
resources.multidb.gtap.adapter = "PDO_MYSQL"
resources.multidb.gtap.host = "localhost"
resources.multidb.gtap.username = "root"
resources.multidb.gtap.password = "letmein1"
resources.multidb.gtap.dbname = "gtap"
resources.multidb.gtap.isDefaultTableAdapter = true
resources.multidb.gtap.default = true
;Forum Database
resources.multidb.phpbb.adapter = "PDO_MYSQL"
resources.multidb.phpbb.host = "localhost"
resources.multidb.phpbb.username = "root"
resources.multidb.phpbb.password = "letmein1"
resources.multidb.phpbb.dbname = "phpbb"
resources.multidb.phpbb.isDefaultTableAdapter = false
Also, make sure you have the latest Zend Framework Library and add it to PHP's include path. That should fix everything up.

Hard time debugging Local Variable in XCode

I'm having a hard-time debugging a local variable. I'm running gcc 4.2, XCode 3.2.4, base SDK Mac OS 10.5, and Objective-C++ in Debug-Mode.
Here's the issue. I'm working on trying to understand some code and it goes like this:
#define MAX4D 500
...
NSMutableArray *viewerPix[ MAX4D ];
When I hover over it during debug (pause on the line before and after) I get this
Unable to access variable "viewerPix"
Unable to access variable "viewerPix"
Unable to access variable "viewerPix"
...
repeated until I kill the application. What would cause this? I've tried setting it to a lower number... but to no avail. Even after I actually set the C-Array:
viewerPix[0] = [[NSMutableArray alloc] initWithCapacity:0];
I still get the same repeated error message.
However, if I don't mouse-over the value (or debug) it "appears" to run fine, even doing stuff like:
[viewerPix[0] addObject: dcmPix];
if( [viewerPix[0] count] != [loadList count])...
but if I debug after those steps, it crashes just like before. Here are my build settings:
STRIPFLAGS =
ALTERNATE_GROUP = $(INSTALL_GROUP)
ALTERNATE_OWNER = $(INSTALL_OWNER)
ALTERNATE_MODE = $(INSTALL_MODE_FLAG)
ALTERNATE_PERMISSIONS_FILES =
DEPLOYMENT_LOCATION = NO
DEPLOYMENT_POSTPROCESSING = NO
INSTALL_GROUP = $(GROUP)
INSTALL_OWNER = $(USER)
INSTALL_MODE_FLAG = u+w,go-w,a+rX
DSTROOT = /tmp/$(PROJECT_NAME).dst
INSTALL_PATH = $(HOME)/Applications
SKIP_INSTALL = NO
COPY_PHASE_STRIP = NO
STRIP_INSTALLED_PRODUCT =
STRIP_STYLE = debugging
SEPARATE_STRIP = NO
GCC_FAST_OBJC_DISPATCH = YES
GCC_AUTO_VECTORIZATION = NO
GCC_OBJC_CALL_CXX_CDTORS = YES
GCC_ENABLE_SSE3_EXTENSIONS = NO
GCC_ENABLE_SSE41_EXTENSIONS = NO
GCC_ENABLE_SSE42_EXTENSIONS = NO
GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = NO
GCC_STRICT_ALIASING = NO
GCC_FEEDBACK_DIRECTED_OPTIMIZATION = Off
GCC_ENABLE_FIX_AND_CONTINUE = NO
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_GENERATE_TEST_COVERAGE_FILES = NO
GCC_INLINES_ARE_PRIVATE_EXTERN = YES
GCC_MODEL_TUNING = G5
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
GCC_ENABLE_KERNEL_DEVELOPMENT = NO
GCC_DEBUGGING_SYMBOLS = default
GCC_REUSE_STRINGS = YES
GCC_NO_COMMON_BLOCKS = NO
GCC_ENABLE_OBJC_GC = unsupported
GCC_OPTIMIZATION_LEVEL = 0
GCC_FAST_MATH = NO
GCC_ENABLE_SYMBOL_SEPARATION = YES
GCC_THREADSAFE_STATICS = YES
GCC_SYMBOLS_PRIVATE_EXTERN = NO
GCC_UNROLL_LOOPS = NO
GCC_MODEL_PPC64 = NO
I don't know what else to say. Let me know what more information is needed, because I'm at a loss. There's also no 'build' tab when I get-info on the .mm file. Just General, Target, Comments (some helps I checked said to remove file-specific tags).
Should I initialize that c-array to nil? I can't just do.. array[500] = {nil}; right? that's C#?
I was using LLVM and Clang 1.5, but I switched to GCC 4.2 since I wasn't getting any local symbols. Am I missing something??
If the optimizer is on, that can effectively eliminate local variables.
However, why a C array of mutable ObjC arrays? That seems odd.
check Product->Scheme->Edit Scheme->Run xxx, Build Configuration is Debug, if that is Release happened you see.