473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Working Directory Problem

I'm developing a plugin for some software. The previous version of the
software didn't require a start in directory to be set. This allowed
me to leave the working directory to the default in the project. Now I
have to get my plugin working with the newer version of the software.
When I start the debugger with it aimed at that program and my program
installed, the program doesn't run properly unless I have the Working
Directory set to the same path as the start in directory for the
shortcut. I guess it uses that for some linking or something like
that, i'm not really sure.

Anyway, when i change the working directory for the program to work,
the debugger doesn't link properly so it's nor hitting any of my
breakpoints. If I don't set the working directory for the program it
doesn't work properly when i start it in the debugger and i can't load
my plugin.

Anyone know what files need to be moved or what has to be done for me
to have the working directory set to the program's director (as needed
for it to run) and have the debugger link properly so that I can get
debugging information as needed?

Dec 2 '05 #1
4 2086
qb******@gmail.com wrote:
If I don't set the working directory for the program it
doesn't work properly when i start it in the debugger and i can't load
my plugin.


Though not what you were asking here's my 5 cents: make a plugin that
doesn't rely in any way on current directory. It can be done (in general
case), and it should be done.
Dec 3 '05 #2
Joe
The plugin doesn't rely on a specific directory. It has to be in a
specific directory in order to be run by the program though. It's MS
VS.NET that needs a specific directory for debugging information. But,
I figure there must be a way around that. That's why i'm here :-D

But yea, finding the debugging info after I change the working
directory is the problem.

Dec 3 '05 #3
qb******@gmail.com wrote:
I'm developing a plugin for some software. The previous version of
the software didn't require a start in directory to be set. This
allowed me to leave the working directory to the default in the
project. Now I have to get my plugin working with the newer version
of the software. When I start the debugger with it aimed at that
program and my program installed, the program doesn't run properly
unless I have the Working Directory set to the same path as the start
in directory for the shortcut. I guess it uses that for some linking
or something like that, i'm not really sure.

Anyway, when i change the working directory for the program to work,
the debugger doesn't link properly so it's nor hitting any of my
breakpoints. If I don't set the working directory for the program it
doesn't work properly when i start it in the debugger and i can't load
my plugin.

Anyone know what files need to be moved or what has to be done for me
to have the working directory set to the program's director (as needed
for it to run) and have the debugger link properly so that I can get
debugging information as needed?


Typically the solution is to add a post-build step to your plug-in project
that copies the .DLL and .PDB files from your project's output directory to
the "plugins" directory of the host application.

If you don't know about post-build steps, reply back with the version of
visual C++ that you're using and I or someone else can help you get a
post-build step set up.

-cd
Dec 3 '05 #4
Joe
I'm using Visual Studio .NET. Thanks a bunch.

Dec 8 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Peter Maas | last post by:
My goal is to have the top level of a directory tree in the Python path without touching anything outside the directory. I tried to create .pth files with the top level path in every subdirectory...
1
by: VM | last post by:
I'm trying to debug an application in the VC dot net compiler and when I begin, I get the error: Unable to start debugging Unable to start program 'c:\myApp\PROGRAM\myApp.exe' 'G:\Program...
9
by: Roni Burd | last post by:
Hi!, I'm having a strange issue while deploying a web site with Validator controls. In my development machine the Validators function perfecly and also when I deploy using XCOPY to a web server....
11
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very...
4
by: Jeff | last post by:
I feel like I should have been able to figure this out but I can't seem to find any references on this topic. It seems like my current working directory is consistently a few directories up from...
2
by: Jon | last post by:
It appears that (windows) python searches in the current working directory before looking in the local site-packages directory, or that '.' comes first in sys.path? The problem arises when I made...
14
by: gio | last post by:
I have a problem and the solution should works under windows and unix OS. Suppose I have a program ex.c in the directory X (so the current working directory of ex.c is X). Also suppose I have...
3
by: duyanning | last post by:
I have written a pyhton script that will process data file in current working directory. My script is in an different directory to data file. When I debug this script using pdb within emacs, emacs...
1
by: Michael Torrie | last post by:
I have a small multi-threaded program that spawns a number of threads that each spawn a particular process in a particular temporary directory. My problem is that using os.chdir to change the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.