--- title: 확장기능 개발 환경 구축 slug: orphaned/확장기능_개발_환경_구축 original_slug: 확장기능_개발_환경_구축 ---

이 글에는 확장기능 개발을 위한 Mozilla 응용프로그램 설정 방법을 제공합니다. 특별한 지정하지 않는 한 이 방법들은 Firefox와 Thunderbird 뿐만 아니라 SeaMonkey 버전 2.0 이상에서도 적용가능합니다.

개요

개발용 프로필

개발 단계에서 성능저하를 방지하려면 환경 설정 및 확장과 관련된 개인 데이터의 손실을 피하기 위해 개발 작업을 위한 별도의 프로필을 사용 할 수 있습니다.

별도의 프로필과 -no-remote 매개 변수와 함께 응용 프로그램을 구동하여 같은 시간에 Thunderbird 또는 Firefox 의 두 개의 인스턴스를 실행 할 수 있습니다.

우분투:

/usr/bin/firefox -no-remote -P dev

다른 리눅스 배포판:

/usr/local/bin/firefox -no-remote -P dev

맥킨토시:

/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev &

윈도우즈:

시작 -> 실행 "%ProgramFiles%\Mozilla Firefox\firefox.exe" -no-remote -P dev

Firefox 대신에 Thunderbird 또는 SeaMonkey를 시작 하려면 , 위의 예제에서 "firefox" 대신 "thunderbird" 또는 "seamonkey" 으로 대체합니다.

프로필 지정이 존재 하지 않는 경우 (또는 프로필을 지정 안하는 경우), Thunderbird 또는 Firefox 프로필 관리자가 표시됩니다. 기본 프로필로 실행 하기위해 프로필을 "default"로 지정합니다. (또는 "-P 를 생략합니다.).

(There is a thread in the Mozillazine forums that explains how to use both stable and development versions of Firefox to check extension compatibility. See Installing Firefox 3 or Minefield while keeping Firefox 2.)

개발용 설정

There is a set of development preferences that, when enabled, allows you to view more information about application activity, thus making debugging easier. However,  these preferences can degrade performance, so you may want to use a separate development profile when you enable these preferences. For more information about Mozilla preferences, refer to the mozillaZine article on "about:config".

Not all preferences are defined by default, and are therefore not listed in about:config by default. You will have to create new (boolean) entries for them.

Accessing Firefox development preferences

To change preference settings in Firefox or SeaMonkey, type about:config in the Location Bar. Alternatively, use the Extension Developer's Extension, which provides a menu interface for Firefox settings.

Accessing Thunderbird development preferences

To change preference settings in Thunderbird, open the "Preferences" (Unix) or "Options" (Windows) interface. On the "Advanced" page, select the "General" tab then click the "Config Editor" button.

개발에 도움되는 확장 기능

이 확장 기능들이 당신이 개발을 할때 도움을 줄 수 있습니다.

 

Firefox extension proxy file

Extension files are normally installed in the user profile. However, it is usually easier to place extension files in a temporary location, which also  protects source files from accidental deletion. This section explains how to create a proxy file that points to an extension that is installed in a location other than the user profile.

  1. Get the extension ID from the extension's install.rdf file.
  2. Create a file in the "extensions" directory under your profile directory with the extension's ID as the file name (for example "your_profile_directory/extensions/{46D1B3C0-DB7A-4b1a-863A-6EE6F77ECB58}"). (How to find your profile directory) Alternatively, rather than using a GUID, create a unique ID using the format "name@youremail" (for example chromebug@mydomain.com).
  3. The contents of this file should be the path to the directory that contains your install.rdf file. (eg. "/full/path/to/yourExtension/". Windows users should use the drive name (CAPS) and backslashes instead of frontslashes (for example "C:\full\path\to\yourExtension\" or "C:\sam\workspace\toolbar\helloWorldtoolbar\").Remember to include the closing slash and remove any trailing whitespace.
  4. Place the file in the extensions folder of your profile and restart the application.

Using directories rather than JARs

Regardless of whether you choose to eventually package your extension's chrome in a JAR or in directories, developing in directories is simpler. If you choose a JARed structure for releasing, you can still develop with a directory structure by editing your chrome.manifest. For example, rather than having

content	myExtension	jar:chrome/myExtension.jar!/content/

use

content	myExtension	chrome/content/